vc獲取作業系統的語言

2021-06-04 17:13:49 字數 2694 閱讀 6006

getsystemdefaultlcid

getuserdefaultuilanguage

getsystemdefaultuilanguage()

對lcid lcid 的值,可以用 word prilan = primarylangid(lcid); word sublan = sublangid(lcid);兩個方法取得主語言和子語言。如主語言是中文, 那麼子語言可以分為中文簡體和中文繁體。

lcid lcid = getsystemdefaultlcid();

if(lcid == 0x409)

if(lcid == 0x404)

if(lcid == 0x804)  

語言對照表:

0x0c04

chinese

hong kong sar

950zhh

0x1404

chinese

macao sar

950zhm

0x0804

chinese

prc936

chs0x1004

chinese

singapore

936zhi

0x0404

chinese

taiwan

950cht

0x0827

classic lithuanian

lithuania

1257

ltc0x040f

icelandic

iceland

1252

isl0x0421

indonesian

indonesia (bahasa)

1252

ind0x0410

italian

italy

1252

ita0x0810

italian

switzerland

1252

its0x0411

japanese

japan

932jpn

0x044b

kannada

india (kannada script)

unicode only

kan0x043f

kazakh

kazakstan

1251

kkz0x0457

konkani

india

unicode only

knk0x0412

korean

korea

949kor

0x0c09

english

australia

1252

ena0x2809

english

belize

1252

enl0x1009

english

canada

1252

enc0x2409

english

caribbean

1252

enb0x1809

english

ireland

1252

eni0x2009

english

jamaica

1252

enj0x1409

english

new zealand

1252

enz0x3409

english

philippines

1252

enp0x1c09

english

south africa

1252

ens0x2c09

english

trinidad

1252

ent0x0809

english

united kingdom

1252

eng0x0409

english

united states

1252

usa0x3009

english

zimbabwe

1252

enw0x0425

estonian

estonia

1257

eti0x0438

faeroese

faeroe islands

1252

fos0x0429

farsi

iran

1256

far0x040b

finnish

finland

1252

fin0x080c

french

belgium

1252

frb0x0c0c

french

canada

1252

frc0x040c

french

france

1252

fra0x140c

french

luxembourg

1252

frl0x180c

french

monaco

1252

frm0x100c

french

switzerland

1252

frs

vc獲取作業系統的語言

1 c,c vc判斷當前作業系統是那種語言 getsystemdefaultlangid getsystemdefaultlcid getuserdefaultuilanguage getsystemdefaultuilanguage 對lcid lcid 的值,可以用 word prilan pr...

VC作業系統服務

需要包含標頭檔案 include 連線scm sc handle hsc openscmanager null,null,sc manager all access if hsc null return service status tyds sc handle scserv print spool...

前端獲取作業系統 作業系統版本

在做埋點的過程中,遇到要上傳作業系統和作業系統版本的需求,如下 通過n igator.useragent獲取首先將作業系統確定為如下對映 all os 獲取當前作業系統 獲取當前作業系統 export const getos if useragent.includes mac else if use...