setup_native/source/win32/customactions/sellang/sellang.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit 840db2a536938a8c6fa6018db48e4a6dd419db9b Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Jul 12 22:56:27 2020 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Jul 12 22:59:11 2020 +0200 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.kagan...@collabora.com> 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); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits