summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librelogo/source/LibreLogo/LibreLogo.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index bf925c88b259..c13c70592881 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -587,6 +587,9 @@ def __setlang__():
global _
c = _.doc.CurrentController.getViewCursor()
locs = [i for i in [c.CharLocale, c.CharLocaleAsian, c.CharLocaleComplex] if i.Language != 'zxx'] # not None language
+ # FIXME-BCP47: this needs adaption to language tags, a simple split on
+ # '-' and assuming second field would be country would already fail if
+ # a script tag was present.
loc = Locale(__uilocale__.split('-')[0], __uilocale__.split('-')[1], '')
if locs and loc not in locs:
loc = locs[0]