summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2020-06-15 09:20:24 +0200
committerAndras Timar <andras.timar@collabora.com>2020-06-15 21:41:01 +0200
commit4bcfd38b16611842be84dda4113ecfa8a79d5d63 (patch)
tree43e6b37c98c822cb04e389b1b09dcbe31954812e /configmgr
parent67d9640a98e28ef523c5cb7d96c661746af90e95 (diff)
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/+/96312 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index c7ad2c538ae8..0c89942cb0c8 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -1387,7 +1387,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 adaption of RFC 4647 lookup matching