- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 获取当前系统语言环境(en,fr,ja等)
uses FMX.Platform{$IFDEF MSWINDOWS}, WinAPi.Windows{$ENDIF};
function GetLang: string;
var
LocaleService: IFMXLocaleService;
begin
Result := '';
if TPlatformServices.Current.SupportsPlatformService(IFMXLocaleService, IInterface(LocaleService)) then
begin
Result := LocaleService.GetCurrentLangID;
end;
end;
Windows 8.1 => zh
Windows 10 => zh
OSX 10.9.5 => ZH
Android 5.1 => jp
Android 4.4.2 => jp
iOS 8.2 => zh