diff options
author | Jean-Pierre Ledure <jp@ledure.be> | 2021-12-08 11:58:20 +0100 |
---|---|---|
committer | Jean-Pierre Ledure <jp@ledure.be> | 2021-12-08 18:19:21 +0100 |
commit | 408838e52900c26824a3e7ace5e4e08982686404 (patch) | |
tree | 8abd75534b3731ff8a0ffbad551622439b15ee2f /wizards | |
parent | 4586a09c8b12e5a185f022b059f2b9b1ba79d5bb (diff) |
ScriptForge - (SF_Utils) language may have a length > 2 in locales
The vaste majority of language codes are 2 characters long.
However it is not the norm.
A length of 3 is admitted for less spread languages
Change-Id: Iabdf6a6cf453169419d0a4a7a3ab6ea80ae4753e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126531
Tested-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/scriptforge/SF_Utils.xba | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wizards/source/scriptforge/SF_Utils.xba b/wizards/source/scriptforge/SF_Utils.xba index b3031e33f09a..2968209aafb3 100644 --- a/wizards/source/scriptforge/SF_Utils.xba +++ b/wizards/source/scriptforge/SF_Utils.xba @@ -425,7 +425,7 @@ Dim vNodePath As Variant vNodePath(0) = New com.sun.star.beans.PropertyValue vNodePath(0).Name = "nodepath" : vNodePath(0).Value = "org.openoffice.System/L10N" sLocale = oConfigProvider.createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", vNodePath()).getByName("SystemLocale") - .Locale.Language = Left(sLocale, 2) + .Locale.Language = Split(sLocale, "-")(0) ' Language is most often 2 chars long, but not always .Locale.Country = Right(sLocale, 2) End If Set _GetUNOService = .Locale |