int nLanguage=g_LocalIni.Get_int("LANGUAGE", "Language",-1);
if(nLanguage == -1)//没有本地设置文件
{
LANGID langID = GetSystemDefaultLangID();//得到系统语言
switch(langID)
{
case 0x0804 :// Chinese (PRC)
g_English = 0;
break;
case 0x0419 :// Russian
g_English = 2;
break;
case 0x0410 :
g_English =3;//意大利
break;
case 0x040c :
g_English=4;//法国
break;
case 0x0415 : //波兰语
g_English=5;
break;
default: // English
g_English = 1;
break;
}
}
else
{
g_English = nLanguage;
if(g_English==0)// 配置为中文
{
LANGID langID = GetSystemDefaultLangID();
g_English = (langID == 0x0804)?0:1; // 确保是中文系统
}
}
if(nLanguage == -1)//没有本地设置文件
{
LANGID langID = GetSystemDefaultLangID();//得到系统语言
switch(langID)
{
case 0x0804 :// Chinese (PRC)
g_English = 0;
break;
case 0x0419 :// Russian
g_English = 2;
break;
case 0x0410 :
g_English =3;//意大利
break;
case 0x040c :
g_English=4;//法国
break;
case 0x0415 : //波兰语
g_English=5;
break;
default: // English
g_English = 1;
break;
}
}
else
{
g_English = nLanguage;
if(g_English==0)// 配置为中文
{
LANGID langID = GetSystemDefaultLangID();
g_English = (langID == 0x0804)?0:1; // 确保是中文系统
}
}