Initializes the locale of text modules with locale api 71/319871/1
authorBowon Ryu <bowon.ryu@samsung.com>
Wed, 19 Feb 2025 04:50:13 +0000 (13:50 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Wed, 19 Feb 2025 04:50:13 +0000 (13:50 +0900)
https://review.tizen.org/gerrit/c/platform/core/uifw/dali-adaptor/+/319856

Change-Id: I550ff42f354423c2ab86fee3994fe2234725a22e
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/text/async-text/async-text-manager-impl.cpp
dali-toolkit/internal/text/multi-language-support-impl.cpp

index 07a553a66765814086c4c6844ef3611e19f46f57..060f5c8adcf931bbe25cc46eb146a6496d7e31e2 100644 (file)
@@ -1791,6 +1791,7 @@ TextLabel::TextLabel(ControlBehaviour additionalBehaviour)
   mIsManualRendered(false),
   mManualRendered(false)
 {
+  mLocale = TextAbstraction::GetLocaleFull();
 }
 
 TextLabel::~TextLabel()
index ad31e8606664f4bd4c570ef389041736bafec21e..6117da52eda762431695d7c58fc0c055fefc6d97 100644 (file)
@@ -62,6 +62,8 @@ AsyncTextManager::AsyncTextManager()
   numberOfLoader = std::clamp(numberOfLoader, MINIMUM_NUMBER_OF_LOADER, MAXIMUM_NUMBER_OF_LOADER);
   DALI_LOG_RELEASE_INFO("Number of async text loaders:%d\n", numberOfLoader);
 
+  mLocale = TextAbstraction::GetLocaleFull();
+
   for(int i = 0; i < numberOfLoader; i++)
   {
     Text::AsyncTextLoader loader = Text::AsyncTextLoader::New();
index 3cf9bdb797cc75c737315ccb64239166eecda2fc..af898038719062d6ee7b1e0f34ca55cba2c1c9ea 100644 (file)
@@ -257,7 +257,7 @@ void DefaultFonts::Cache(const TextAbstraction::FontDescription& description, Fo
 MultilanguageSupport::MultilanguageSupport(bool connectLocaleChangedSignal)
 : mDefaultFontPerScriptCache(),
   mValidFontsPerScriptCache(),
-  mLocale(std::string())
+  mLocale()
 {
   // Initializes the default font cache to zero (invalid font).
   // Reserves space to cache the default fonts and access them with the script as an index.
@@ -267,6 +267,8 @@ MultilanguageSupport::MultilanguageSupport(bool connectLocaleChangedSignal)
   // Reserves space to cache the valid fonts and access them with the script as an index.
   mValidFontsPerScriptCache.Resize(TextAbstraction::GetNumberOfScripts(), NULL);
 
+  mLocale = TextAbstraction::GetLocaleFull();
+
   if(connectLocaleChangedSignal && Dali::Adaptor::IsAvailable())
   {
     Dali::Adaptor::Get().LocaleChangedSignal().Connect(this, &MultilanguageSupport::OnLocaleChanged);