Search code examples
c++winapiglobalization

listing of neutral cultures


How do I list neutral cultures in C++/WinAPI application? For specific cultures EnumSystemLocales function works reasonably well, but for some reason it does not list neutral cultures. In the end I want to have LCID<=>culture name mapping (eg. 1045<=>pl-PL and 21<=>pl).


Solution

  • If all you want to do is to map between LCIDs and locale names, then LCIDToLocaleName with LOCALE_ALLOW_NEUTRAL_NAMES flag (Win 7 and above) and LocaleNameToLCID also with LOCALE_ALLOW_NEUTRAL_NAMES flag (Win 7 and above) is probably what you want. EnumSystemLocalesEx with LOCALE_NEUTRALDATA flag (Win 7 and above) will list the neutral cultures.