]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.cpp
Fix the rest of bug 5010.
[lyx.git] / src / LyX.cpp
index 6a6c140e1f8488715ca444197c3f65a11f570ca5..5ff73f64eaf9a7b92987944b6c9627c3377d7f03 100644 (file)
@@ -347,8 +347,9 @@ void LyX::setRcGuiLanguage()
 {
        if (lyxrc.gui_language == "auto")
                return;
-       LYXERR(Debug::LOCALE, "Setting LANGUAGE to " << lyxrc.gui_language);
-       if (!setEnv("LANGUAGE", lyxrc.gui_language))
+       Language const * language = languages.getLanguage(lyxrc.gui_language);
+       LYXERR(Debug::LOCALE, "Setting LANGUAGE to " << language->code());
+       if (!setEnv("LANGUAGE", language->code()))
                LYXERR(Debug::LOCALE, "\t... failed!");
        LYXERR(Debug::LOCALE, "Setting LC_ALL to en_US");
        if (!setEnv("LC_ALL", "en_US"))