本文整理自网络,侵删。
uses FMX.Platform;
function TForm2.GetCurrentLan: string;var LocServ: IFMXLocaleService;begin //读取当前语言,测试通过。 if TPlatformServices.Current.SupportsPlatformService(IFMXLocaleService, IInterface(LocServ)) then Result := LocServ.GetCurrentLangID;
end;
以上代码,Windows 和 Android 底下测试通过。iOS 想来也不会有问题。
参考: Language on iOS/Android
相关阅读 >>
Delphi 2009 之 tcategorypanelgroup[4]: height
Delphi systemparametersinfo 用法
Delphi 如何将access数据库后缀名accdb改为mdb
更多相关阅读请进入《Delphi》频道 >>