add russian language support

This commit is contained in:
dumganhar 2011-11-01 23:32:26 +08:00
parent cf3cecc108
commit 240aa4c077
2 changed files with 27 additions and 29 deletions

View File

@ -62,6 +62,7 @@ typedef enum LanguageType
kLanguageItalian, kLanguageItalian,
kLanguageGerman, kLanguageGerman,
kLanguageSpanish, kLanguageSpanish,
kLanguageRussian
} ccLanguageType; } ccLanguageType;
NS_CC_END; NS_CC_END;

View File

@ -58,36 +58,33 @@ CCApplication& CCApplication::sharedApplication()
ccLanguageType CCApplication::getCurrentLanguage() ccLanguageType CCApplication::getCurrentLanguage()
{ {
ccLanguageType ret = kLanguageEnglish; ccLanguageType ret = kLanguageEnglish;
do result r = E_SUCCESS;
String value;
r = SettingInfo::GetValue(L"Language", value);
if (value.Equals("ZHO", false))
{ {
result r = E_SUCCESS; ret = kLanguageChinese;
String value; }
r = SettingInfo::GetValue(L"Language", value); else if (value.Equals("FRA", false))
if (value.Equals("ZHO", false)) {
{ ret = kLanguageFrench;
ret = kLanguageChinese; }
} else if (value.Equals("ITA", false))
else if (value.Equals("FRA", false)) {
{ ret = kLanguageItalian;
ret = kLanguageFrench; }
} else if (value.Equals("DEU", false))
else if (value.Equals("ITA", false)) {
{ ret = kLanguageGerman;
ret = kLanguageItalian; }
} else if (value.Equals("SPA", false))
else if (value.Equals("DEU", false)) {
{ ret = kLanguageSpanish;
ret = kLanguageGerman; }
} else if (value.Equals("RUS", false))
else if (value.Equals("SPA", false)) {
{ ret = kLanguageRussian;
ret = kLanguageSpanish; }
}
else
{
ret = kLanguageEnglish;
}
} while (0);
return ret; return ret;
} }