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,
|
||||
kLanguageKorean,
|
||||
kLanguageJapanese,
|
||||
kLanguageHungarian
|
||||
kLanguageHungarian,
|
||||
kLanguagePortuguese,
|
||||
kLanguageArabic
|
||||
} ccLanguageType;
|
||||
|
||||
// end of platform group
|
||||
|
|
|
@ -120,6 +120,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
else if (0 == strcmp("pt", pLanguageName))
|
||||
{
|
||||
ret = kLanguagePortuguese;
|
||||
}
|
||||
else if (0 == strcmp("ar", pLanguageName))
|
||||
{
|
||||
ret = kLanguageArabic;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -159,6 +159,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret_language = kLanguageHungarian;
|
||||
}
|
||||
else if (strcmp(language, "pt") == 0)
|
||||
{
|
||||
ret_language = kLanguagePortuguese;
|
||||
}
|
||||
else if (strcmp(language, "ar") == 0)
|
||||
{
|
||||
ret_language = kLanguageArabic;
|
||||
}
|
||||
|
||||
free(language);
|
||||
free(country);
|
||||
|
|
|
@ -113,6 +113,12 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
else if ([languageCode isEqualToString:@"hu"]){
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"pt"]){
|
||||
ret = kLanguagePortuguese;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ar"]){
|
||||
ret = kLanguageArabic;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -152,6 +152,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
{
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
else if (0 == strcmp("pt", pLanguageName))
|
||||
{
|
||||
ret = kLanguagePortuguese;
|
||||
}
|
||||
else if (0 == strcmp("ar", pLanguageName))
|
||||
{
|
||||
ret = kLanguageArabic;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -119,6 +119,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
else if ([languageCode isEqualToString:@"hu"]){
|
||||
ret = kLanguageHungarian;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"pt"])
|
||||
{
|
||||
ret = kLanguagePortuguese;
|
||||
}
|
||||
else if ([languageCode isEqualToString:@"ar"])
|
||||
{
|
||||
ret = kLanguageArabic;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -185,6 +185,14 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
case S3E_DEVICE_LANGUAGE_HUNGARIAN:
|
||||
currentLanguage = kLanguageHungarian;
|
||||
break;
|
||||
|
||||
case S3E_DEVICE_LANGUAGE_PORTUGUESE:
|
||||
currentLanguage = kLanguagePortuguese;
|
||||
break;
|
||||
|
||||
case S3E_DEVICE_LANGUAGE_ARABIC:
|
||||
currentLanguage = kLanguageArabic;
|
||||
break;
|
||||
|
||||
default:
|
||||
currentLanguage = kLanguageEnglish;
|
||||
|
|
|
@ -145,6 +145,12 @@ ccLanguageType CCApplication::getCurrentLanguage()
|
|||
case LANG_HUNGARIAN:
|
||||
ret = kLanguageHungarian;
|
||||
break;
|
||||
case LANG_PORTUGUESE:
|
||||
ret = kLanguagePortuguese;
|
||||
break;
|
||||
case LANG_ARABIC:
|
||||
ret = kLanguageArabic;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue