From 240aa4c0777c479cb7e78efbda6886e799bc887d Mon Sep 17 00:00:00 2001 From: dumganhar Date: Tue, 1 Nov 2011 23:32:26 +0800 Subject: [PATCH] add russian language support --- cocos2dx/platform/CCCommon.h | 1 + cocos2dx/platform/bada/CCApplication_bada.cpp | 55 +++++++++---------- 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/cocos2dx/platform/CCCommon.h b/cocos2dx/platform/CCCommon.h index 49638f3b2e..b5fe077150 100644 --- a/cocos2dx/platform/CCCommon.h +++ b/cocos2dx/platform/CCCommon.h @@ -62,6 +62,7 @@ typedef enum LanguageType kLanguageItalian, kLanguageGerman, kLanguageSpanish, + kLanguageRussian } ccLanguageType; NS_CC_END; diff --git a/cocos2dx/platform/bada/CCApplication_bada.cpp b/cocos2dx/platform/bada/CCApplication_bada.cpp index c9ac0cd57c..e9cbfc0aec 100644 --- a/cocos2dx/platform/bada/CCApplication_bada.cpp +++ b/cocos2dx/platform/bada/CCApplication_bada.cpp @@ -58,36 +58,33 @@ CCApplication& CCApplication::sharedApplication() ccLanguageType CCApplication::getCurrentLanguage() { ccLanguageType ret = kLanguageEnglish; - do + result r = E_SUCCESS; + String value; + r = SettingInfo::GetValue(L"Language", value); + if (value.Equals("ZHO", false)) { - result r = E_SUCCESS; - String value; - r = SettingInfo::GetValue(L"Language", value); - if (value.Equals("ZHO", false)) - { - ret = kLanguageChinese; - } - else if (value.Equals("FRA", false)) - { - ret = kLanguageFrench; - } - else if (value.Equals("ITA", false)) - { - ret = kLanguageItalian; - } - else if (value.Equals("DEU", false)) - { - ret = kLanguageGerman; - } - else if (value.Equals("SPA", false)) - { - ret = kLanguageSpanish; - } - else - { - ret = kLanguageEnglish; - } - } while (0); + ret = kLanguageChinese; + } + else if (value.Equals("FRA", false)) + { + ret = kLanguageFrench; + } + else if (value.Equals("ITA", false)) + { + ret = kLanguageItalian; + } + else if (value.Equals("DEU", false)) + { + ret = kLanguageGerman; + } + else if (value.Equals("SPA", false)) + { + ret = kLanguageSpanish; + } + else if (value.Equals("RUS", false)) + { + ret = kLanguageRussian; + } return ret; }