]> git.lyx.org Git - lyx.git/blob - src/gettext.h
Enable convertDefault.sh to run even if its executable bit is not set.
[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
13 #ifndef GETTEXT_H
14 #define GETTEXT_H
15
16 /*
17  * Native Language Support
18  *
19  * The general idea is that any string that should be translated is handled
20  * as follows:
21  *      _("string")
22  *
23  * Static strings are special, obviously and must be flagged as follows:
24  *      static str = N_("string");
25  *
26  * And wherever they are used:
27  *      _(str)
28  *
29  * Every file where there are strings needs:
30  *      #include "gettext.h"
31  *
32  * Remember to mention each of these files in "po/POFILES.in"
33  *
34  * The main() needs a locale_init() and a gettext_init() in the beginning.
35  */
36
37 /*
38  * General translation notes:
39  *   Commands/options are not translated
40  *   Debug messages are not translated
41  *   Panic/fatal (that should not happen) messages need not be translated
42  */
43
44 #include "LString.h"
45
46 //#ifdef ENABLE_NLS
47
48 ///
49 string const _(string const &);
50
51 //#else // ENABLE_NLS
52
53 ///
54 //#  define _(str) (str)
55
56 //#endif
57
58 #  define N_(str) (str)              // for detecting static strings
59
60 ///
61 void locale_init();
62
63 #endif