]> git.lyx.org Git - features.git/commitdiff
Messages::get(): Add two error messages just in case.
authorAbdelrazak Younes <younes@lyx.org>
Tue, 24 Jun 2008 12:45:57 +0000 (12:45 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 24 Jun 2008 12:45:57 +0000 (12:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25378 a592a061-630c-0410-9148-cb99ea01b6c8

src/support/Messages.cpp

index 16a286c3d3f152287cbb6e2d91eb6d5efe924553..b9a5bb5545cbb1436ef983eb882ce2bd7683fac4 100644 (file)
@@ -116,14 +116,18 @@ docstring const Messages::get(string const & m) const
        if (!lang_.empty()) {
                // This GNU extension overrides any language locale
                // wrt gettext.
-               setEnv("LANGUAGE", lang_);
+               bool success = setEnv("LANGUAGE", lang_);
+               if (!success)
+                       LYXERR0("WARNING: Cannot set env LANGUAGE variable to " << lang_);
                // However, setting LANGUAGE does nothing when the
                // locale is "C". Therefore we set the locale to
                // something that is believed to exist on most
                // systems. The idea is that one should be able to
                // load German documents even without having de_DE
                // installed.
-               setEnv("LC_ALL", "en_US");
+               success = setEnv("LC_ALL", "en_US");
+               if (!success)
+                       LYXERR0("WARNING: Cannot set env LC_ALL variable to en_US");
 #ifdef HAVE_LC_MESSAGES
                setlocale(LC_MESSAGES, "");
 #endif