Merge pull request #1973 from benjamesward/gles20

Adding Portuguese and Arabic language support
This commit is contained in:
minggo 2013-02-15 17:54:12 -08:00
commit fcbdac0681
8 changed files with 55 additions and 1 deletions

View File

@ -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

View File

@ -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;
} }

View File

@ -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);

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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;
} }

View File

@ -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;

View File

@ -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;