diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-27 22:22:51 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-27 22:23:14 +0100 |
commit | 76c22d36f15d1c2447ba9c7470a2d173e398bc03 (patch) | |
tree | 399a5973b5efde14af5cdc5d0993a36fd257be67 /desktop | |
parent | cb523b62a4a63b70054d7a16385faf5f3a76be28 (diff) |
Desktop::GetDesktopResManager: handle language tag
Change-Id: Ica043b923e0918f65fb6b18c4205ba91784ef3c2
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index bbbe2280ff9a..cfa6a52b313a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -349,18 +349,14 @@ ResMgr* Desktop::GetDesktopResManager() // Use VCL to get the correct language specific message as we // are in the bootstrap process and not able to get the installed // language!! - /* FIXME-BCP47: handle language tag! */ OUString aUILocaleString = LanguageSelection::getLanguageString(); - sal_Int32 nIndex = 0; - OUString aLanguage = aUILocaleString.getToken( 0, '-', nIndex); - OUString aCountry = aUILocaleString.getToken( 0, '-', nIndex); - OUString aVariant = aUILocaleString.getToken( 0, '-', nIndex); - - ::com::sun::star::lang::Locale aLocale( aLanguage, aCountry, aVariant ); - + LanguageTag aLanguageTag( aUILocaleString); + //! ResMgr may modify the Locale for fallback! + ::com::sun::star::lang::Locale aLocale( aLanguageTag.getLocale()); Desktop::pResMgr = ResMgr::SearchCreateResMgr( "dkt", aLocale); + aLanguageTag.reset( aLocale); AllSettings as = GetSettings(); - as.SetUILanguageTag(LanguageTag(aLocale)); + as.SetUILanguageTag(aLanguageTag); SetSettings(as); } } |