From 1b8cbfef2481c06bc6d7bf3c5d5811b0d2b9b423 Mon Sep 17 00:00:00 2001 From: Andras Timar Date: Mon, 15 Jun 2020 09:20:24 +0200 Subject: Use getBcp47() instead of getLanguage() getLanguage() only returns the language code which can be ambiguous in case of UI localization, when there are more than one language variants. Fallback to the first variant caused mixed language UI, e.g. en-US vs. en-GB, pt vs. pt-BR, zh-CN vs. zh-TW. Change-Id: I888423cd4b3c65dbdb900ff3b6bc308fa119be4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96285 Tested-by: Jenkins Reviewed-by: Andras Timar --- configmgr/source/access.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configmgr/source') diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 9fe7f31cc00f..e07fc8446f51 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1382,7 +1382,7 @@ rtl::Reference< ChildAccess > Access::getChild(OUString const & name) { // here we override it with the actual current-user's language to // support per-view localization in LOK. if (comphelper::LibreOfficeKit::isActive()) - locale = comphelper::LibreOfficeKit::getLanguageTag().getLanguage(); + locale = comphelper::LibreOfficeKit::getLanguageTag().getBcp47(); if (!locale.isEmpty()) { // Find best match using an adaptation of RFC 4647 lookup matching -- cgit