X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLyX.cpp;h=1c0609331c64129eab055dcbae0e82807f8cc628;hb=ac3f391b46d25784f3129e24658b73c4bc15febf;hp=0122f7e5111bce9acd036b5c80a74aeded50d4c4;hpb=79beb91e3a3538e204c436a664efdbeb28d15eb9;p=lyx.git diff --git a/src/LyX.cpp b/src/LyX.cpp index 0122f7e511..1c0609331c 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -233,16 +233,19 @@ Messages & LyX::messages(string const & language) void setRcGuiLanguage() { - LASSERT(singleton_, ""); + LASSERT(singleton_, /**/); if (lyxrc.gui_language == "auto") return; 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!"); + if (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")) LYXERR(Debug::LOCALE, "\t... failed!"); + Messages::init(); singleton_->pimpl_->messages_["GUI"] = Messages(); } @@ -322,7 +325,7 @@ int LyX::exec(int & argc, char * argv[]) prepareExit(); return exit_status; } - + // FIXME /* Create a CoreApplication class that will provide the main event loop * and the socket callback registering. With Qt4, only QtCore @@ -704,6 +707,9 @@ bool LyX::init() // Read lyxrc.dist again to be able to override viewer auto-detection. readRcFile("lyxrc.dist"); + // Set again the language defined by the distributor. + setRcGuiLanguage(); + system_lyxrc = lyxrc; system_formats = formats; pimpl_->system_converters_ = pimpl_->converters_;