Jonathan Wareham
Jonathan Wareham

Reputation: 3399

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 (e.g. 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?

Upvotes: 0

Views: 676

Answers (1)

RRUZ
RRUZ

Reputation: 136401

Try the TPlatform.GetCurrentLangID property

Check this sample

uses
  FMX.Platform;

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

Upvotes: 3

Related Questions