- 人气:
- 放大
- 缩小
- 二维码
- 赞赏
delphi 关于多语言:如何获取当前系统语言
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 想来也不会有问题。
————————————————
原文链接:https://blog.csdn.net/pcplayer/article/details/79578258