3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
7 * \author Jean-Marc Lasgouttes
9 * Full author contact details are available in file CREDITS.
17 #include "support/environment.h"
18 #include "support/lstrings.h"
27 using support::setEnv;
32 docstring const _(string const & str)
34 return getGuiMessages().get(str);
42 // Disable, as otherwise it overrides everything else incl. the doc language
43 setEnv("LANGUAGE", "");
44 # ifdef HAVE_LC_MESSAGES
45 setlocale(LC_MESSAGES, "");
47 setlocale(LC_CTYPE, "");
48 setlocale(LC_NUMERIC, "C");
55 setlocale(LC_NUMERIC, "C");
61 docstring const translateIfPossible(docstring const & name)
63 if (support::isAscii(name))
64 // Probably from a standard configuration file, try to
66 return _(to_ascii(name));
68 // This must be from a user defined configuration file. We
69 // cannot translate this, since gettext accepts only ascii