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