Kaydet (Commit) d92715c7 authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Andras Timar

configmgr: support changing locale language

Change-Id: Ia8318ce8ca3ae9fdbd526e0d41861e2863fb9a94
Reviewed-on: https://gerrit.libreoffice.org/68262Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
Tested-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst 4c9f230e
......@@ -71,6 +71,7 @@
#include <com/sun/star/uno/XWeak.hpp>
#include <com/sun/star/util/ElementChange.hpp>
#include <comphelper/sequence.hxx>
#include <comphelper/lok.hxx>
#include <cppu/unotype.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/supportsservice.hxx>
......@@ -1390,6 +1391,13 @@ rtl::Reference< ChildAccess > Access::getChild(OUString const & name) {
locale.isEmpty(), "configmgr",
("access best-matching localized property value via \"*<locale>\""
" with empty <locale>; falling back to defaults"));
// Since the locale given to us is the one used at initialization,
// 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();
if (!locale.isEmpty()) {
// Find best match using an adaption of RFC 4647 lookup matching
// rules, removing "-" or "_" delimited segments from the end:
......
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