summaryrefslogtreecommitdiff
path: root/padmin/source
diff options
context:
space:
mode:
Diffstat (limited to 'padmin/source')
-rw-r--r--padmin/source/helper.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx
index 69c5631fa2e5..8e16ca406710 100644
--- a/padmin/source/helper.cxx
+++ b/padmin/source/helper.cxx
@@ -54,7 +54,7 @@ ResId padmin::PaResId( sal_uInt32 nId )
static ResMgr* pPaResMgr = NULL;
if( ! pPaResMgr )
{
- ::com::sun::star::lang::Locale aLocale;
+ LanguageTag aLanguageTag( LANGUAGE_SYSTEM);
utl::OConfigurationNode aNode =
utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
@@ -66,16 +66,12 @@ ResId padmin::PaResId( sal_uInt32 nId )
Any aValue = aNode.getNodeValue( OUString("ooLocale") );
if( aValue >>= aLoc )
{
- /* FIXME-BCP47: handle language tags! */
- sal_Int32 nIndex = 0;
- aLocale.Language = aLoc.getToken( 0, '-', nIndex );
- aLocale.Country = aLoc.getToken( 0, '-', nIndex );
- aLocale.Variant = aLoc.getToken( 0, '-', nIndex );
+ aLanguageTag.reset( aLoc);
}
}
- pPaResMgr = ResMgr::SearchCreateResMgr( "spa", aLocale );
+ pPaResMgr = ResMgr::SearchCreateResMgr( "spa", aLanguageTag );
AllSettings aSettings = Application::GetSettings();
- aSettings.SetUILanguageTag( LanguageTag( aLocale) );
+ aSettings.SetUILanguageTag( aLanguageTag );
Application::SetSettings( aSettings );
}
return ResId( nId, *pPaResMgr );