mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1973 from benjamesward/gles20
Adding Portuguese and Arabic language support
This commit is contained in:
commit
fcbdac0681
|
@ -66,7 +66,9 @@ typedef enum LanguageType
|
||||||
kLanguageRussian,
|
kLanguageRussian,
|
||||||
kLanguageKorean,
|
kLanguageKorean,
|
||||||
kLanguageJapanese,
|
kLanguageJapanese,
|
||||||
kLanguageHungarian
|
kLanguageHungarian,
|
||||||
|
kLanguagePortuguese,
|
||||||
|
kLanguageArabic
|
||||||
} ccLanguageType;
|
} ccLanguageType;
|
||||||
|
|
||||||
// end of platform group
|
// end of platform group
|
||||||
|
|
|
@ -120,6 +120,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
{
|
{
|
||||||
ret = kLanguageHungarian;
|
ret = kLanguageHungarian;
|
||||||
}
|
}
|
||||||
|
else if (0 == strcmp("pt", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguagePortuguese;
|
||||||
|
}
|
||||||
|
else if (0 == strcmp("ar", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguageArabic;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,6 +159,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
{
|
{
|
||||||
ret_language = kLanguageHungarian;
|
ret_language = kLanguageHungarian;
|
||||||
}
|
}
|
||||||
|
else if (strcmp(language, "pt") == 0)
|
||||||
|
{
|
||||||
|
ret_language = kLanguagePortuguese;
|
||||||
|
}
|
||||||
|
else if (strcmp(language, "ar") == 0)
|
||||||
|
{
|
||||||
|
ret_language = kLanguageArabic;
|
||||||
|
}
|
||||||
|
|
||||||
free(language);
|
free(language);
|
||||||
free(country);
|
free(country);
|
||||||
|
|
|
@ -113,6 +113,12 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
else if ([languageCode isEqualToString:@"hu"]){
|
else if ([languageCode isEqualToString:@"hu"]){
|
||||||
ret = kLanguageHungarian;
|
ret = kLanguageHungarian;
|
||||||
}
|
}
|
||||||
|
else if ([languageCode isEqualToString:@"pt"]){
|
||||||
|
ret = kLanguagePortuguese;
|
||||||
|
}
|
||||||
|
else if ([languageCode isEqualToString:@"ar"]){
|
||||||
|
ret = kLanguageArabic;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,6 +152,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
{
|
{
|
||||||
ret = kLanguageHungarian;
|
ret = kLanguageHungarian;
|
||||||
}
|
}
|
||||||
|
else if (0 == strcmp("pt", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguagePortuguese;
|
||||||
|
}
|
||||||
|
else if (0 == strcmp("ar", pLanguageName))
|
||||||
|
{
|
||||||
|
ret = kLanguageArabic;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
else if ([languageCode isEqualToString:@"hu"]){
|
else if ([languageCode isEqualToString:@"hu"]){
|
||||||
ret = kLanguageHungarian;
|
ret = kLanguageHungarian;
|
||||||
}
|
}
|
||||||
|
else if ([languageCode isEqualToString:@"pt"])
|
||||||
|
{
|
||||||
|
ret = kLanguagePortuguese;
|
||||||
|
}
|
||||||
|
else if ([languageCode isEqualToString:@"ar"])
|
||||||
|
{
|
||||||
|
ret = kLanguageArabic;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -185,6 +185,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
case S3E_DEVICE_LANGUAGE_HUNGARIAN:
|
case S3E_DEVICE_LANGUAGE_HUNGARIAN:
|
||||||
currentLanguage = kLanguageHungarian;
|
currentLanguage = kLanguageHungarian;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case S3E_DEVICE_LANGUAGE_PORTUGUESE:
|
||||||
|
currentLanguage = kLanguagePortuguese;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case S3E_DEVICE_LANGUAGE_ARABIC:
|
||||||
|
currentLanguage = kLanguageArabic;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
currentLanguage = kLanguageEnglish;
|
currentLanguage = kLanguageEnglish;
|
||||||
|
|
|
@ -145,6 +145,12 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
||||||
case LANG_HUNGARIAN:
|
case LANG_HUNGARIAN:
|
||||||
ret = kLanguageHungarian;
|
ret = kLanguageHungarian;
|
||||||
break;
|
break;
|
||||||
|
case LANG_PORTUGUESE:
|
||||||
|
ret = kLanguagePortuguese;
|
||||||
|
break;
|
||||||
|
case LANG_ARABIC:
|
||||||
|
ret = kLanguageArabic;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue