]> git.lyx.org Git - lyx.git/blobdiff - src/gettext.cpp
adjust
[lyx.git] / src / gettext.cpp
index e7b16507360925fe0c67ddabe65e3a562384c136..08bbdee2fe209e65204409c10e6243e71eee9fc9 100644 (file)
 #include "gettext.h"
 #include "Messages.h"
 
-#include "support/environment.h"
 #include "support/lstrings.h"
 
-
-namespace lyx {
-
 #ifdef HAVE_LOCALE_H
 #  include <locale.h>
 #endif
 
-using support::setEnv;
-
 using std::string;
 
 
+namespace lyx {
+
 docstring const _(string const & str)
 {
        return getGuiMessages().get(str);
 }
 
 
-#ifdef ENABLE_NLS
-
 void locale_init()
 {
-       // Disable, as otherwise it overrides everything else incl. the doc language
-       setEnv("LANGUAGE", "");
+#ifdef ENABLE_NLS
 #  ifdef HAVE_LC_MESSAGES
        setlocale(LC_MESSAGES, "");
 #  endif
        setlocale(LC_CTYPE, "");
+       Messages::init();
+#endif
        setlocale(LC_NUMERIC, "C");
 }
 
-#else // ENABLE_NLS
-
-void locale_init()
-{
-       setlocale(LC_NUMERIC, "C");
-}
-
-#endif
-
 
 docstring const translateIfPossible(docstring const & name)
 {