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

相关阅读 >>

Delphi侦测按键输入

Delphi 合并文本行的函数

Delphi winapi: extracticon - 获取 exe、dll 或 ico 文件中的图标

Delphi中调用api函数exitwindowsex可以实现系统的关机,注销,和重启

Delphi 获取打印机纸型的例子

Delphi入门语法

Delphi 一个定时器timer1相关的简单例子

wmi远程访问问题解决方法

Delphi读取一个access数据库中的表名

Delphi 字符串操作之格式化

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...