mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-18 01:19:45 +08:00
This commit improves the best locale match algorithm by prioritizing closer matches and add many new tests verifying that this works as expected. In order to do this, new information had to be added to the language database, which was extended with it and updated to use the latest Unicode CLDR data and latest Windows 11 locale list. Further, add a set of scripts for maintaining the language database up to date and a GitHub workflow `genlangdb.yml` which can be run manually to regenerate the wxWidgets language-related source and header files from the underlying Windows and Unicode data. It produces 2 artifacts: - wxLanguageDatabaseDist.zip allows to easily update the language-related files in the wxWidgets repository by simply copying all files. - the normal workflow log and wxLanguageDatabaseLog.zip allow to check all temporary files of the regeneration process and to detect potential issues, before the language-related files are actually replaced by the new ones. Finally, fix wxUILocaleImplName::GetPreferredUILanguages: Under Windows 10 and above the Windows API function ::GetUserPreferredUILanguages() returns only the primary UI language plus US English. Additional preferred UI languages installed by the user are ignored, so instead of using this function read the list of user preferred languages from the Windows registry. Closes #24855.