This is a good idea!
using System.Management;
string OSLangu
string Langimport
managementObjectSearcher = new ManagementObjectSearcher("Select * From Win32_OperatingSystem");
managementObjectCollection = managementObjectSearcher.Get();
foreach (ManagementBaseObject managementBaseObject1 in managementObjectCollection)
{
ManagementObject managementObject2 = (ManagementObject)managementBaseObject1;
OSLangu = "系统语言 = " + GetStrValueMO(managementObject2["OSLanguage"]);
}
finally
{
int Langnum = Convert.ToInt32(OSLangu);
switch(Langnum)
CASE 1033:
Langimport="en";
CASE 1031:
Langimport="de";
CASE 1041:
Langimport="ja";
CASE 2052:
Langimport="zh";
CASE 1049:
Langimport="ru";
}
1025 Arabic - Saudi Arabia ar
1029 Czech cs
1030 Danish da
1031 German – Germany de
1032 Greek el
1035 Finnish fi
1036 French – France fr
1037 Hebrew he
1038 Hungarian hu
1040 Italian – Italy it
1041 Japanese ja
1042 Korean ko
1043 Dutch – Netherlands nl
1044 Norwegian (Bokmål) no
1045 Polish pl
1046 Portuguese – Brazil pt
1049 Russian ru
1053 Swedish sv
1055 Turkish tr
2052 Chinese – Simplified zh
2070 Portuguese – Portugal pt
3082 Spanish - Spain (Modern Sort) es