Under Windows I can get the LangId:
procedure TForm1.FormCreate(Sender: TObject);
var
LangID: DWORD;
begin
LangID := GetUserDefaultLangID;
case Byte(LangID and $03FF) of
LANG_ENGLISH: siLangDispatcher1.ActiveLanguage := 1;
LANG_GERMAN: siLangDispatcher1.ActiveLanguage := 2;
LANG_FRENCH: siLangDispatcher1.ActiveLanguage := 3;
else
siLangDispatcher1.ActiveLanguage := 1;
end;
Is there a way to get LANG_ENGLISH, LANG_GERMAN under IOS and Android?
How can I get the language under IOS and Android
Hello,
SysLocale global variable includes this information under any OS.
so the sample code would be:
FAQ: http://www.tsilang.com/delphiglobalizat ... aq.html#18
SysLocale global variable includes this information under any OS.
Code: Select all
{ System Locale information record }
TSysLocale = packed record
DefaultLCID: TLocaleID;
PriLangID: Integer;
SubLangID: Integer;
FarEast: Boolean;
MiddleEast: Boolean;
end;
Code: Select all
case SysLocale.PriLangID of
LANG_ENGLISH: siLangDispatcher1.ActiveLanguage := 1;
LANG_GERMAN: siLangDispatcher1.ActiveLanguage := 2;
LANG_FRENCH: siLangDispatcher1.ActiveLanguage := 3;
else
siLangDispatcher1.ActiveLanguage := 1;