diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-05 16:44:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-06 18:48:35 +0200 |
commit | 8f629b8fbeb13a593f6aff28d2ff0399eb4ee56a (patch) | |
tree | b005f54c31b76a416a3ed1bf0bad6b7d1e810c77 /vcl | |
parent | 4ddb7976e7d23c902647c651074849bc7682e564 (diff) |
set LANGUAGE from SvtSysLocale().GetUILanguageTag()
Change-Id: I466576660bdc281c3332fa25f0fe0756cd356ab7
Reviewed-on: https://gerrit.libreoffice.org/40788
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-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(); |