summaryrefslogtreecommitdiff
path: root/setup_native
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2016-09-08 10:36:52 +0200
committerAndras Timar <andras.timar@collabora.com>2016-09-21 21:40:04 +0000
commit0794fb0edc85bf147e4d199e541efaad578e4b96 (patch)
treeb7aef842d54b3e0d648ad3c4a90993f14a60cbea /setup_native
parent131446b38311b3437daa187ac534a0d05a9df9ee (diff)
tdf#92266 better language selection in Windows installer
It won't select 'kok' when we have 'ko', 'sid' when we have 'si', but language variants will fall back, e.g. en_ZW -> en. Change-Id: Ie417b6be664d5148829d2f7280e20653f84bc7a3 Reviewed-on: https://gerrit.libreoffice.org/28744 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'setup_native')
-rw-r--r--setup_native/source/win32/customactions/sellang/sellang.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx
index f83b0ac84abb..0d82244e64cb 100644
--- a/setup_native/source/win32/customactions/sellang/sellang.cxx
+++ b/setup_native/source/win32/customactions/sellang/sellang.cxx
@@ -185,8 +185,13 @@ static BOOL
present_in_ui_langs(const char *lang)
{
for (int i = 0; i < num_ui_langs; i++)
- if (memcmp (ui_langs[i], lang, std::min(strlen(ui_langs[i]), strlen(lang))) == 0)
+ {
+ if (strchr (lang, '_') != NULL)
+ if (memcmp (ui_langs[i], lang, std::min(strlen(ui_langs[i]), strlen(lang))) == 0)
+ return TRUE;
+ if (strcmp (ui_langs[i], lang) == 0)
return TRUE;
+ }
return FALSE;
}