diff --git a/cocos/platform/CCCommon.h b/cocos/platform/CCCommon.h index a81fcb6280..b2707d2e8b 100644 --- a/cocos/platform/CCCommon.h +++ b/cocos/platform/CCCommon.h @@ -67,7 +67,8 @@ enum class LanguageType POLISH, TURKISH, UKRAINIAN, - ROMANIAN + ROMANIAN, + BULGARIAN }; // END of platform group diff --git a/cocos/platform/android/CCApplication-android.cpp b/cocos/platform/android/CCApplication-android.cpp index fb55ae001c..dacc0a33b1 100644 --- a/cocos/platform/android/CCApplication-android.cpp +++ b/cocos/platform/android/CCApplication-android.cpp @@ -188,6 +188,10 @@ LanguageType Application::getCurrentLanguage() { ret = LanguageType::ROMANIAN; } + else if (0 == strcmp("bg", pLanguageName)) + { + ret = LanguageType::BULGARIAN; + } return ret; } diff --git a/cocos/platform/ios/CCApplication-ios.mm b/cocos/platform/ios/CCApplication-ios.mm index 8563079159..0d515a575f 100644 --- a/cocos/platform/ios/CCApplication-ios.mm +++ b/cocos/platform/ios/CCApplication-ios.mm @@ -161,6 +161,9 @@ LanguageType Application::getCurrentLanguage() else if ([languageCode isEqualToString:@"ro"]){ ret = LanguageType::ROMANIAN; } + else if ([languageCode isEqualToString:@"bg"]){ + ret = LanguageType::BULGARIAN; + } return ret; } diff --git a/cocos/platform/linux/CCApplication-linux.cpp b/cocos/platform/linux/CCApplication-linux.cpp index 3302759c67..e88d064cf6 100644 --- a/cocos/platform/linux/CCApplication-linux.cpp +++ b/cocos/platform/linux/CCApplication-linux.cpp @@ -257,6 +257,10 @@ LanguageType Application::getCurrentLanguage() { ret = LanguageType::ROMANIAN; } + else if (0 == strcmp("bg", pLanguageName)) + { + ret = LanguageType::BULGARIAN; + } return ret; } diff --git a/cocos/platform/mac/CCApplication-mac.mm b/cocos/platform/mac/CCApplication-mac.mm index b9a7c64e9f..8593d58b7e 100644 --- a/cocos/platform/mac/CCApplication-mac.mm +++ b/cocos/platform/mac/CCApplication-mac.mm @@ -215,6 +215,9 @@ LanguageType Application::getCurrentLanguage() else if ([languageCode isEqualToString:@"ro"]){ ret = LanguageType::ROMANIAN; } + else if ([languageCode isEqualToString:@"bg"]){ + ret = LanguageType::BULGARIAN; + } return ret; } diff --git a/cocos/platform/win32/CCApplication-win32.cpp b/cocos/platform/win32/CCApplication-win32.cpp index 4d16d4f93f..6e2579b0b6 100644 --- a/cocos/platform/win32/CCApplication-win32.cpp +++ b/cocos/platform/win32/CCApplication-win32.cpp @@ -194,6 +194,9 @@ LanguageType Application::getCurrentLanguage() case LANG_ROMANIAN: ret = LanguageType::ROMANIAN; break; + case LANG_BULGARIAN: + ret = LanguageType::BULGARIAN; + break; } return ret; diff --git a/cocos/platform/winrt/CCApplication.cpp b/cocos/platform/winrt/CCApplication.cpp index d7d2410c95..8f1bf87280 100644 --- a/cocos/platform/winrt/CCApplication.cpp +++ b/cocos/platform/winrt/CCApplication.cpp @@ -205,6 +205,10 @@ LanguageType Application::getCurrentLanguage() { ret = LanguageType::ROMANIAN; } + else if (strncmp(code, "bg", 2) == 0) + { + ret = LanguageType::BULGARIAN; + } return ret; }