本文整理自网络,侵删。
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――――――――――――――――
原文链接:https://blog.csdn.net/pcplayer/article/details/79578258
相关阅读 >>
Delphi动态创建tadoquery加access出现'不正常的定义参数对象 提供了不一致或不完整的信息'错误
Delphi webbrowser 无法调用当前浏览器的版本
Delphi 分解时间 �cdecodedate、decodetime … decodedatetime …
Delphi判断mssql数据库中表格是否存在? 如何批量创建表格?
更多相关阅读请进入《Delphi》频道 >>