diff --git a/cocos2dx/platform/CCCommon.h b/cocos2dx/platform/CCCommon.h index 064d870ab5..1b3ebc07e3 100644 --- a/cocos2dx/platform/CCCommon.h +++ b/cocos2dx/platform/CCCommon.h @@ -65,7 +65,8 @@ typedef enum LanguageType kLanguageSpanish, kLanguageRussian, kLanguageKorean, - kLanguageJapanese + kLanguageJapanese, + kLanguageHungarian } ccLanguageType; // end of platform group diff --git a/cocos2dx/platform/android/CCApplication.cpp b/cocos2dx/platform/android/CCApplication.cpp index 44b0491f74..67b9b42e01 100644 --- a/cocos2dx/platform/android/CCApplication.cpp +++ b/cocos2dx/platform/android/CCApplication.cpp @@ -116,6 +116,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageJapanese; } + else if (0 == strcmp("hu", pLanguageName)) + { + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/blackberry/CCApplication.cpp b/cocos2dx/platform/blackberry/CCApplication.cpp index 9744a0bcaf..f855796735 100644 --- a/cocos2dx/platform/blackberry/CCApplication.cpp +++ b/cocos2dx/platform/blackberry/CCApplication.cpp @@ -155,6 +155,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret_language = kLanguageJapanese; } + else if (strcmp(language, "hu") == 0) + { + ret_language = kLanguageHungarian; + } free(language); free(country); diff --git a/cocos2dx/platform/ios/CCApplication.mm b/cocos2dx/platform/ios/CCApplication.mm index e92448dd75..7927944b8d 100644 --- a/cocos2dx/platform/ios/CCApplication.mm +++ b/cocos2dx/platform/ios/CCApplication.mm @@ -110,6 +110,9 @@ ccLanguageType CCApplication::getCurrentLanguage() else if ([languageCode isEqualToString:@"ja"]){ ret = kLanguageJapanese; } + else if ([languageCode isEqualToString:@"hu"]){ + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/linux/CCApplication.cpp b/cocos2dx/platform/linux/CCApplication.cpp index 823f2712a4..397b6f7ea9 100644 --- a/cocos2dx/platform/linux/CCApplication.cpp +++ b/cocos2dx/platform/linux/CCApplication.cpp @@ -148,6 +148,10 @@ ccLanguageType CCApplication::getCurrentLanguage() { ret = kLanguageJapanese; } + else if (0 == strcmp("hu", pLanguageName)) + { + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/mac/CCApplication.mm b/cocos2dx/platform/mac/CCApplication.mm index 266495d311..866fa1ba36 100755 --- a/cocos2dx/platform/mac/CCApplication.mm +++ b/cocos2dx/platform/mac/CCApplication.mm @@ -116,6 +116,9 @@ ccLanguageType CCApplication::getCurrentLanguage() else if ([languageCode isEqualToString:@"ja"]){ ret = kLanguageJapanese; } + else if ([languageCode isEqualToString:@"hu"]){ + ret = kLanguageHungarian; + } return ret; } diff --git a/cocos2dx/platform/marmalade/CCApplication.cpp b/cocos2dx/platform/marmalade/CCApplication.cpp index ce32d9473b..25370cea71 100644 --- a/cocos2dx/platform/marmalade/CCApplication.cpp +++ b/cocos2dx/platform/marmalade/CCApplication.cpp @@ -181,6 +181,10 @@ ccLanguageType CCApplication::getCurrentLanguage() currentLanguage = kLanguageJapanese; break; + case S3E_DEVICE_LANGUAGE_HUNGARIAN: + currentLanguage = kLanguageHungarian; + break; + default: currentLanguage = kLanguageEnglish; break; diff --git a/cocos2dx/platform/win32/CCApplication.cpp b/cocos2dx/platform/win32/CCApplication.cpp index 1bee37baa1..a774d350eb 100644 --- a/cocos2dx/platform/win32/CCApplication.cpp +++ b/cocos2dx/platform/win32/CCApplication.cpp @@ -142,6 +142,9 @@ ccLanguageType CCApplication::getCurrentLanguage() case LANG_JAPANESE: ret = kLanguageJapanese; break; + case LANG_HUNGARIAN: + ret = kLanguageHungarian; + break; } return ret; diff --git a/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp b/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp index 6c2f8d5459..344cfbb5bc 100644 --- a/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp +++ b/samples/TestCpp/Classes/CurrentLanguageTest/CurrentLanguageTest.cpp @@ -39,6 +39,9 @@ CurrentLanguageTest::CurrentLanguageTest() case kLanguageJapanese: labelLanguage->setString("current language is Japanese"); break; + case kLanguageHungarian: + labelLanguage->setString("current language is Hungarian"); + break; } addChild(labelLanguage); diff --git a/tools/tolua++/CCApplication.pkg b/tools/tolua++/CCApplication.pkg index ce2185e656..7be440f1b5 100644 --- a/tools/tolua++/CCApplication.pkg +++ b/tools/tolua++/CCApplication.pkg @@ -9,7 +9,8 @@ typedef enum LanguageType kLanguageSpanish, kLanguageRussian, kLanguageKorean, - kLanguageJapanese + kLanguageJapanese, + kLanguageHungarian } ccLanguageType; enum TargetPlatform