Fix wrong language priority setting 60/274060/1
authorHwankyu Jhun <h.jhun@samsung.com>
Wed, 20 Apr 2022 12:49:04 +0000 (21:49 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Wed, 20 Apr 2022 12:52:30 +0000 (21:52 +0900)
The language value MUST be "<system_lang>:en_US:en_GB:en".
Currently, the language value is "en:en_GB:en_US:<system_lang>".
This patch adjusts the language priority.

Change-Id: Id07dfd0c6ca60997c8aa599f2cfcdab41268563d
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
tizen-cpp/app-core-cpp/app_core_base.cc

index f35293a..5bceb80 100644 (file)
@@ -977,12 +977,10 @@ std::string AppCoreBase::Impl::GetLanguage(std::string lang) {
   AppendDefaultLangs(lang_set);
   std::string ret;
   for (auto& i : lang_set) {
-    if (ret.empty()) {
+    if (ret.empty())
       ret = i;
-    } else {
-      ret += ":";
-      ret += i;
-    }
+    else
+      ret = i + ":" + ret;
   }
 
   return ret;