Kaydet (Commit) d412e969 authored tarafından Caolán McNamara's avatar Caolán McNamara

Revert "make LANGUAGE setting universal, not just gtk specific"

poxy cppunit tests can't use config here

This reverts commit f55eeb7a.
üst 345be151
...@@ -318,17 +318,6 @@ bool InitVCL() ...@@ -318,17 +318,6 @@ bool InitVCL()
// soffice/sfx implementation creates the global service manager // soffice/sfx implementation creates the global service manager
pSVData->mpApp->Init(); pSVData->mpApp->Init();
//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(Application::GetSettings().GetUILanguageTag().getGlibcLocaleString(".UTF-8"));
if (!aLocaleString.isEmpty())
{
OUString envVar("LANGUAGE");
osl_setEnvironment(envVar.pData, aLocaleString.pData);
}
pSVData->mpDefInst->AfterAppInit(); pSVData->mpDefInst->AfterAppInit();
// Fetch AppFileName and make it absolute before the workdir changes... // Fetch AppFileName and make it absolute before the workdir changes...
......
...@@ -167,6 +167,12 @@ GtkInstance::GtkInstance( SalYieldMutex* pMutex ) ...@@ -167,6 +167,12 @@ GtkInstance::GtkInstance( SalYieldMutex* pMutex )
//UI in a LTR locale //UI in a LTR locale
void GtkInstance::AfterAppInit() void GtkInstance::AfterAppInit()
{ {
OUString aLocaleString(Application::GetSettings().GetUILanguageTag().getGlibcLocaleString(".UTF-8"));
if (!aLocaleString.isEmpty())
{
OUString envVar("LANGUAGE");
osl_setEnvironment(envVar.pData, aLocaleString.pData);
}
EnsureInit(); EnsureInit();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment