From 9e310ba2720cb57d9bcb3f023e1ace1e43a4f200 Mon Sep 17 00:00:00 2001 From: loadrunner Date: Wed, 25 Feb 2015 17:20:48 +0200 Subject: [PATCH] added Romanian language --- cocos/platform/CCCommon.h | 3 ++- cocos/platform/android/CCApplication-android.cpp | 4 ++++ cocos/platform/ios/CCApplication-ios.mm | 3 +++ cocos/platform/linux/CCApplication-linux.cpp | 4 ++++ cocos/platform/mac/CCApplication-mac.mm | 3 +++ cocos/platform/win32/CCApplication-win32.cpp | 3 +++ cocos/platform/winrt/CCApplication.cpp | 4 ++++ 7 files changed, 23 insertions(+), 1 deletion(-) diff --git a/cocos/platform/CCCommon.h b/cocos/platform/CCCommon.h index 3837a16e50..a81fcb6280 100644 --- a/cocos/platform/CCCommon.h +++ b/cocos/platform/CCCommon.h @@ -66,7 +66,8 @@ enum class LanguageType NORWEGIAN, POLISH, TURKISH, - UKRAINIAN + UKRAINIAN, + ROMANIAN }; // END of platform group diff --git a/cocos/platform/android/CCApplication-android.cpp b/cocos/platform/android/CCApplication-android.cpp index 541dfcd20e..fb55ae001c 100644 --- a/cocos/platform/android/CCApplication-android.cpp +++ b/cocos/platform/android/CCApplication-android.cpp @@ -184,6 +184,10 @@ LanguageType Application::getCurrentLanguage() { ret = LanguageType::UKRAINIAN; } + else if (0 == strcmp("ro", pLanguageName)) + { + ret = LanguageType::ROMANIAN; + } return ret; } diff --git a/cocos/platform/ios/CCApplication-ios.mm b/cocos/platform/ios/CCApplication-ios.mm index 53e7d90671..8563079159 100644 --- a/cocos/platform/ios/CCApplication-ios.mm +++ b/cocos/platform/ios/CCApplication-ios.mm @@ -158,6 +158,9 @@ LanguageType Application::getCurrentLanguage() else if ([languageCode isEqualToString:@"uk"]){ ret = LanguageType::UKRAINIAN; } + else if ([languageCode isEqualToString:@"ro"]){ + ret = LanguageType::ROMANIAN; + } return ret; } diff --git a/cocos/platform/linux/CCApplication-linux.cpp b/cocos/platform/linux/CCApplication-linux.cpp index 34062995ad..3302759c67 100644 --- a/cocos/platform/linux/CCApplication-linux.cpp +++ b/cocos/platform/linux/CCApplication-linux.cpp @@ -253,6 +253,10 @@ LanguageType Application::getCurrentLanguage() { ret = LanguageType::UKRAINIAN; } + else if (0 == strcmp("ro", pLanguageName)) + { + ret = LanguageType::ROMANIAN; + } return ret; } diff --git a/cocos/platform/mac/CCApplication-mac.mm b/cocos/platform/mac/CCApplication-mac.mm index bb8cbbfa27..b9a7c64e9f 100644 --- a/cocos/platform/mac/CCApplication-mac.mm +++ b/cocos/platform/mac/CCApplication-mac.mm @@ -212,6 +212,9 @@ LanguageType Application::getCurrentLanguage() else if ([languageCode isEqualToString:@"uk"]){ ret = LanguageType::UKRAINIAN; } + else if ([languageCode isEqualToString:@"ro"]){ + ret = LanguageType::ROMANIAN; + } return ret; } diff --git a/cocos/platform/win32/CCApplication-win32.cpp b/cocos/platform/win32/CCApplication-win32.cpp index ad540fd5b1..4d16d4f93f 100644 --- a/cocos/platform/win32/CCApplication-win32.cpp +++ b/cocos/platform/win32/CCApplication-win32.cpp @@ -191,6 +191,9 @@ LanguageType Application::getCurrentLanguage() case LANG_UKRAINIAN: ret = LanguageType::UKRAINIAN; break; + case LANG_ROMANIAN: + ret = LanguageType::ROMANIAN; + break; } return ret; diff --git a/cocos/platform/winrt/CCApplication.cpp b/cocos/platform/winrt/CCApplication.cpp index 72952607af..d7d2410c95 100644 --- a/cocos/platform/winrt/CCApplication.cpp +++ b/cocos/platform/winrt/CCApplication.cpp @@ -201,6 +201,10 @@ LanguageType Application::getCurrentLanguage() { ret = LanguageType::UKRAINIAN; } + else if (strncmp(code, "ro", 2) == 0) + { + ret = LanguageType::ROMANIAN; + } return ret; }