mirror of https://github.com/axmolengine/axmol.git
Merge pull request #497 from walzer/master
add more languages to CCApplication::getCurrentLanguage() method
This commit is contained in:
commit
a68fb803a0
|
@ -58,6 +58,10 @@ typedef enum LanguageType
|
||||||
{
|
{
|
||||||
kLanguageEnglish = 0,
|
kLanguageEnglish = 0,
|
||||||
kLanguageChinese,
|
kLanguageChinese,
|
||||||
|
kLanguageFrench,
|
||||||
|
kLanguageItalian,
|
||||||
|
kLanguageGerman,
|
||||||
|
kLanguageSpanish,
|
||||||
} ccLanguageType;
|
} ccLanguageType;
|
||||||
|
|
||||||
NS_CC_END;
|
NS_CC_END;
|
||||||
|
|
|
@ -89,7 +89,23 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
{
|
{
|
||||||
ret = kLanguageEnglish;
|
ret = kLanguageEnglish;
|
||||||
}
|
}
|
||||||
|
else if (0 == strcmp("fr", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguageFrench;
|
||||||
|
}
|
||||||
|
else if (0 == strcmp("it", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguageItalian;
|
||||||
|
}
|
||||||
|
else if (0 == strcmp("de", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguageGerman;
|
||||||
|
}
|
||||||
|
else if (0 == strcmp("es", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguageSpanish;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,18 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
{
|
{
|
||||||
ret = kLanguageEnglish;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue