summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2021-12-08 11:58:20 +0100
committerJean-Pierre Ledure <jp@ledure.be>2021-12-08 18:19:21 +0100
commit408838e52900c26824a3e7ace5e4e08982686404 (patch)
tree8abd75534b3731ff8a0ffbad551622439b15ee2f /wizards
parent4586a09c8b12e5a185f022b059f2b9b1ba79d5bb (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.xba2
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 = &quot;nodepath&quot; : vNodePath(0).Value = &quot;org.openoffice.System/L10N&quot;
sLocale = oConfigProvider.createInstanceWithArguments(&quot;com.sun.star.configuration.ConfigurationAccess&quot;, vNodePath()).getByName(&quot;SystemLocale&quot;)
- .Locale.Language = Left(sLocale, 2)
+ .Locale.Language = Split(sLocale, &quot;-&quot;)(0) &apos; Language is most often 2 chars long, but not always
.Locale.Country = Right(sLocale, 2)
End If
Set _GetUNOService = .Locale