Please help! I'm trying to get all
the supported languages from the system but for some reason, the callback
function below is only called once. I've already
checked HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\Locale to see if
there are more than one locale entry. Can anyone please tell me why my
callback function is only called once?
function SystemLocalCallBack(Locale: PChar): Bool;
stdcall;
var Language: array[0..64] of char; Country: array[0..64] of char; begin GetLocaleInfo(StrToInt('$'+Locale),LOCALE_SENGLANGUAGE,@Language,Length(Language)); GetLocaleInfo(StrToInt('$'+Locale),LOCALE_SENGCOUNTRY, @Country, Length(Country)); LocaleListNormal.Add( Language + ' (' + Country + ')'); LocaleListWithData.Add('$'+Locale +','+Language + ' (' + Country + ')'); result := Bool(1); end; EnumSystemLocales(@SystemLocalCallBack,
LCID_SUPPORTED);
|