简体   繁体   中英

Delphi XE2 - Return system locale in FireMonkey

I have a Delphi XE2 FireMonkey app which I'm running on Win32 and MacOSX. I want to return the current system locale (eg en_GB) the app is running on whether this is Win32 or MacOSX. Is there a FireMonkey class/property that will provide this, maybe similar to TOSVersion? Or other way of retrieving it?

Try the TPlatform.GetCurrentLangID property

Check this sample

uses
  FMX.Platform;

procedure TForm1.FormCreate(Sender: TObject);
begin
  ShowMessage(Platform.GetCurrentLangID);
end;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM