
Delphi xe.
For Tab Administrative – Unicode lang
use GetSystemDefaultLangID
For Tab Formats –
use GetUserDefaultLangID
But what do I use for For Tab Location?
For Tab “Keyboard and Language”
for Vista and above: Getlocaleinfo with key LOCALE_CUSTOM_UI_DEFAULT
Function GetLocaleInformation(flag: integer): string;
var
pclca: array[0..20] of char;
begin
if (GetLocaleInfo(
//locale_system_default - Always identical values returns
LOCALE_CUSTOM_UI_DEFAULT // work only Vista-Win7, not Xp **
,flag,pclca,19) <= 0 ) then begin
pclca[0] := #0;
end;
Result := pclca;
end;
- How do I define Location in Xp+Win7 and Display Language in Xp?
- Can be a universal key for definition “Display Language” both for Xp and for Win7
- How to receive the list of the established languages of the interface?
1.1 – How to get selected geographical location (geographic ID) ?
Use the
GetUserGeoIDfunction which returns thegeographical locationcurrently selected by user.1.2 – How to get selected display language for Multilingual User Interface (MUI) in Windows XP ?
Use the
GetUserDefaultUILanguagefunction which returns thelanguage identifiercurrently selected by user.2 – Is there an universal way how to get the selected display language supported since Windows XP till Windows 7 ?
Yes, it is. It’s just the previously mentioned
GetUserDefaultUILanguagefunction. There’s a remark:It is supported since Windows 2000 and it should return selected display language even for Windows Vista above (
LOCALE_CUSTOM_UI_DEFAULT).3 – How to get the list of available user interface languages ?
Use the
EnumUILanguagesfunction. In Windows XP, it passes thelanguage identifiersto theEnumUILanguagesProccallback function. Since Windows Vista you can even specify additional flags which supplies to pass the language names to that callback function or you can specify the filtering for licensed languages or for the languages allowed by the group policy.