2 * \file src/gettext.cpp
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/lstrings.h"
28 docstring const _(string const & str)
30 return getGuiMessages().get(str);
37 # ifdef HAVE_LC_MESSAGES
38 setlocale(LC_MESSAGES, "");
40 setlocale(LC_CTYPE, "");
43 setlocale(LC_NUMERIC, "C");
47 docstring const translateIfPossible(docstring const & name)
49 if (support::isAscii(name))
50 // Probably from a standard configuration file, try to
52 return _(to_ascii(name));
54 // This must be from a user defined configuration file. We
55 // cannot translate this, since gettext accepts only ascii