diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-12 22:56:27 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2020-07-12 22:59:11 +0200 |
commit | 840db2a536938a8c6fa6018db48e4a6dd419db9b (patch) | |
tree | 9a8f118842c44ad243146acd2084c8c538919c53 /setup_native | |
parent | b88b681743b1278b4fa44bef4d5bce3e2cb49316 (diff) |
Related: tdf#82184: consider installer language for UI list to install
If user has a language set as user locale, and installer is shown in that
language, it's likely that that language is needed for installation.
Change-Id: I37fb959291262b772ec8e1b35c687d64e0ee76a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98612
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'setup_native')
-rw-r--r-- | setup_native/source/win32/customactions/sellang/sellang.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/setup_native/source/win32/customactions/sellang/sellang.cxx b/setup_native/source/win32/customactions/sellang/sellang.cxx index 3154e1190e41..35022ac7dd50 100644 --- a/setup_native/source/win32/customactions/sellang/sellang.cxx +++ b/setup_native/source/win32/customactions/sellang/sellang.cxx @@ -330,6 +330,15 @@ extern "C" __declspec(dllexport) UINT __stdcall SelectLanguage( MSIHANDLE handle //TODO: are the above two explicit additions necessary, or will // those values always be included in the below EnumUILanguages // anyway? + if (GetMsiPropA(handle, "ProductLanguage", &pVal)) + { + // This addition might refer to a language without an installed system language pack + // If the installer is run in this language, then this language is likely needed + long langid = strtol(pVal, nullptr, 10); + if (langid > 0xFFFF) + return TRUE; + add_ui_lang(langid_to_string(static_cast<LANGID>(langid))); + } EnumUILanguagesA(enum_ui_lang_proc, 0, 0); } |