Permalink
Browse files

fixed #676, add more languages into CCApplication::getCurrentLanguage…

…(). Android & iPhone port is done, other platforms no yet.
  • Loading branch information...
1 parent 4e6c338 commit a24a84d82e8707b22f40733dfde1bb6f9e84ca0e @walzer walzer committed Aug 31, 2011
@@ -58,6 +58,10 @@ typedef enum LanguageType
{
kLanguageEnglish = 0,
kLanguageChinese,
+ kLanguageFrench,
+ kLanguageItalian,
+ kLanguageGerman,
+ kLanguageSpanish,
} ccLanguageType;
NS_CC_END;
@@ -89,7 +89,23 @@ ccLanguageType CCApplication::getCurrentLanguage()
{
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;
}
@@ -126,6 +126,18 @@ of this software and associated documentation files (the "Software"), to deal
{
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;
}

0 comments on commit a24a84d

Please sign in to comment.