revert language

This commit is contained in:
dumganhar 2011-11-02 01:23:07 +08:00
parent e9a2818d0d
commit 2998726364
1 changed files with 24 additions and 26 deletions

View File

@ -129,32 +129,30 @@ ccLanguageType CCApplication::getCurrentLanguage()
{
ccLanguageType ret = kLanguageEnglish;
do
LCID localeID = GetUserDefaultLCID();
unsigned short primaryLanguageID = localeID & 0xFF;
switch (primaryLanguageID)
{
int nCount = sizeof(arrayChineseCode) / sizeof(int);
for (int i = 0; i < nCount; ++i)
{
if (arrayChineseCode[i] == LanguageID)
{
if (LanguageID == 2052)
{
ret = kLanguageChinese_Simplified;
}
else
{
ret = kLanguageChinese_Traditional;
}
case LANG_CHINESE:
ret = kLanguageChinese;
break;
case LANG_FRENCH:
ret = kLanguageFrench;
break;
case LANG_ITALIAN:
ret = kLanguageItalian;
break;
case LANG_GERMAN:
ret = kLanguageGerman;
break;
case LANG_SPANISH:
ret = kLanguageSpanish;
break;
case LANG_RUSSIAN:
ret = kLanguageRussian;
break;
}
}
CC_BREAK_IF(kLanguageEnglish != ret);
if (1041 == LanguageID)
{
ret = kLanguageJapanese;
}
} while (0);
return ret;
}