mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1474 from wenbin1989/gles20
Add kLanguageKorean to ccLanguageType and getCurrentLanguage()
This commit is contained in:
commit
9cf3f4c5f6
|
@ -63,7 +63,8 @@ typedef enum LanguageType
|
|||
kLanguageItalian,
|
||||
kLanguageGerman,
|
||||
kLanguageSpanish,
|
||||
kLanguageRussian
|
||||
kLanguageRussian,
|
||||
kLanguageKorean
|
||||
} ccLanguageType;
|
||||
|
||||
// end of platform group
|
||||
|
|
|
@ -108,6 +108,10 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret = kLanguageRussian;
|
||||
}
|
||||
else if (0 == strcmp("ko", pLanguageName))
|
||||
{
|
||||
ret = kLanguageKorean;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -147,6 +147,10 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret_language = kLanguageRussian;
|
||||
}
|
||||
else if (strcmp(language, "ko") == 0)
|
||||
{
|
||||
ret_language = kLanguageKorean;
|
||||
}
|
||||
|
||||
free(language);
|
||||
free(country);
|
||||
|
|
|
@ -104,6 +104,9 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
else if ([languageCode isEqualToString:@"ru"]){
|
||||
ret = kLanguageRussian;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ko"]){
|
||||
ret = kLanguageKorean;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -95,6 +95,24 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret = kLanguageEnglish;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"fr"]){
|
||||
ret = kLanguageFrench;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"it"]){
|
||||
ret = kLanguageItalian;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"de"]){
|
||||
ret = kLanguageGerman;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"es"]){
|
||||
ret = kLanguageSpanish;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ru"]){
|
||||
ret = kLanguageRussian;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ko"]){
|
||||
ret = kLanguageKorean;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -118,6 +118,9 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
case LANG_CHINESE:
|
||||
ret = kLanguageChinese;
|
||||
break;
|
||||
case LANG_ENGLISH:
|
||||
ret = kLanguageEnglish;
|
||||
break;
|
||||
case LANG_FRENCH:
|
||||
ret = kLanguageFrench;
|
||||
break;
|
||||
|
@ -133,6 +136,9 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
case LANG_RUSSIAN:
|
||||
ret = kLanguageRussian;
|
||||
break;
|
||||
case LANG_KOREAN:
|
||||
ret = kLanguageKorean;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -34,6 +34,9 @@ CurrentLanguageTest::CurrentLanguageTest()
|
|||
case kLanguageSpanish:
|
||||
labelLanguage->setString("current language is Spanish");
|
||||
break;
|
||||
case kLanguageKorean:
|
||||
labelLanguage->setString("current language is Korean");
|
||||
break;
|
||||
}
|
||||
|
||||
addChild(labelLanguage);
|
||||
|
|
Loading…
Reference in New Issue