wizards/source/scriptforge/SF_Utils.xba |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 408838e52900c26824a3e7ace5e4e08982686404
Author:     Jean-Pierre Ledure <j...@ledure.be>
AuthorDate: Wed Dec 8 11:58:20 2021 +0100
Commit:     Jean-Pierre Ledure <j...@ledure.be>
CommitDate: Wed Dec 8 18:19:21 2021 +0100

    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 <j...@ledure.be>
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <j...@ledure.be>

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

Reply via email to