资料收集站

SDL

Thursday
Jan 08th
Text size
  • Increase font size
  • Default font size
  • Decrease font size

如何获取系统的语言类型?

1、  
ShowMessage(  Format('$%.4x',[GetSystemDefaultLangID])+Format('$%.4x',[GetUserDefaultLangID]));  
2、  
ShowMessage(GetLocaleString(LOCALE_SENGLANGUAGE));  
 
function  GetLocaleString(lctp:  LCTYPE):  String;  
var  
   j:  Integer;  
   s:  String;  
begin  
       j  :=  GetLocaleInfo(GetSystemDefaultLCID,  lctp,  PChar(nil),  0);  
       SetLength(s,  j);  
       GetLocaleInfo(GetSystemDefaultLCID,  lctp,  PChar(s),  j);  
       SetLength(s,  j-1);  
       Result  :=  s;  
end;  
---------------------------------------------------------------  
 
case  GetSystemDefaultLangID  of  
       $00000404  :  //    中文  (台
Comments (0)Add Comment

Write comment

busy
 

Google 搜索

在线用户

We have 74 guests online