]> git.lyx.org Git - lyx.git/blob - src/gettext.h
cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
[lyx.git] / src / gettext.h
1 // -*- C++ -*-
2 /**
3  * \file src/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 #include "support/docstring.h"
17
18 #include <string>
19
20 /*
21  * Native Language Support
22  *
23  * The general idea is that any string that should be translated is handled
24  * as follows:
25  *      _("string")
26  *
27  * Static strings are special, obviously and must be flagged as follows:
28  *      static str = N_("string");
29  *
30  * And wherever they are used:
31  *      _(str)
32  *
33  * Every file where there are strings needs:
34  *      #include "gettext.h"
35  *
36  * Remember to mention each of these files in "po/POFILES.in"
37  *
38  * The main() needs a locale_init() and a gettext_init() in the beginning.
39  */
40
41 /*
42  * General translation notes:
43  *   Commands/options are not translated
44  *   Debug messages are not translated
45  *   Panic/fatal (that should not happen) messages need not be translated
46  */
47
48
49 //#ifdef ENABLE_NLS
50
51 ///
52 lyx::docstring const _(std::string const &);
53
54 //#else // ENABLE_NLS
55
56 ///
57 //#  define _(str) (str)
58
59 //#endif
60
61 #  define N_(str) (str)              // for detecting static strings
62
63 ///
64 void locale_init();
65
66 #endif