]> git.lyx.org Git - lyx.git/blob - src/gettext.h
architectural changes to tex2lyx
[lyx.git] / src / gettext.h
1 // -*- C++ -*-
2 /**
3  * \file gettext.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author Jean-Marc Lasgouttes
9  *
10  * Full author contact details are available in file CREDITS
11  */
12 #ifndef GETTEXT_H
13 #define GETTEXT_H
14
15 /*
16  * Native Language Support
17  *
18  * The general idea is that any string that should be translated is handled
19  * as follows:
20  *      _("string")
21  *
22  * Static strings are special, obviously and must be flagged as follows:
23  *      static str = N_("string");
24  *
25  * And wherever they are used:
26  *      _(str)
27  *
28  * Every file where there are strings needs:
29  *      #include "gettext.h"
30  *
31  * Remember to mention each of these files in "po/POFILES.in"
32  *
33  * The main() needs a locale_init() and a gettext_init() in the beginning.
34  */
35
36 /*
37  * General translation notes:
38  *   Commands/options are not translated
39  *   Debug messages are not translated
40  *   Panic/fatal (that should not happen) messages need not be translated
41  */
42
43 #include "LString.h"
44
45 //#ifdef ENABLE_NLS
46
47 ///
48 string const _(string const &);
49
50 //#else // ENABLE_NLS
51
52 ///
53 //#  define _(str) (str)
54
55 //#endif
56
57 #  define N_(str) (str)              // for detecting static strings
58
59 ///
60 void locale_init();
61
62 #endif