diff options
-rw-r--r-- | vcl/source/app/svmain.cxx | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 61f589aaf93a..1b88fc290157 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -322,18 +322,15 @@ bool InitVCL() pSVData->mpApp->Init(); } - if (pSVData->maAppData.mpSettings) - { - //Now that uno has been bootstrapped we can ask the config what the UI language is so that we can - //force that in as $LANGUAGE. That way we can get gtk to render widgets RTL - //if we have a RTL UI in an otherwise LTR locale and get gettext using externals (e.g. python) - //to match their translations to our preferred UI language - OUString aLocaleString(pSVData->maAppData.mpSettings->GetUILanguageTag().getGlibcLocaleString(".UTF-8")); - if (!aLocaleString.isEmpty()) - { - OUString envVar("LANGUAGE"); - osl_setEnvironment(envVar.pData, aLocaleString.pData); - } + //Now that uno has been bootstrapped we can ask the config what the UI language is so that we can + //force that in as $LANGUAGE. That way we can get gtk to render widgets RTL + //if we have a RTL UI in an otherwise LTR locale and get gettext using externals (e.g. python) + //to match their translations to our preferred UI language + OUString aLocaleString(SvtSysLocaleOptions().GetRealUILanguageTag().getGlibcLocaleString(".UTF-8")); + if (!aLocaleString.isEmpty()) + { + OUString envVar("LANGUAGE"); + osl_setEnvironment(envVar.pData, aLocaleString.pData); } pSVData->mpDefInst->AfterAppInit(); |