class
CTextLocalizationManager
- Module
- Arc
- Header
#include "Arc/Core/CText.h"- Namespace
Arcf
Public functions
| Returns | Name | Description |
|---|---|---|
CTextLocalizationManager& | Get | |
void | SetLanguage | Switching the language invalidates every widget, because a shaped text layout is keyed on the resolved string and nothing else would tell a text block that its glyphs are stale. |
const std::string& | GetLanguage | |
void | SetFallbackLanguage | |
const std::string& | GetFallbackLanguage | |
bool | IsRTL | |
uint32_t | GetRevision | Bumped on every language change; CText memoizes against it. |
void | RegisterString | |
const std::string* | FindString | The active language's translation of the key, or null. |
std::string | Resolve | Active language → fallback language → source. |
std::string | ResolvePlural | |
std::string | ResolveSelect |
Function details
Get
C++
static CTextLocalizationManager& Get()SetLanguage
C++
void SetLanguage(const std::string& langCode)Switching the language invalidates every widget, because a shaped text layout is keyed on the resolved string and nothing else would tell a text block that its glyphs are stale.
GetLanguage
C++
const std::string& GetLanguage() constSetFallbackLanguage
C++
void SetFallbackLanguage(const std::string& langCode)GetFallbackLanguage
C++
const std::string& GetFallbackLanguage() constIsRTL
C++
bool IsRTL() constGetRevision
C++
uint32_t GetRevision() constBumped on every language change; CText memoizes against it.
RegisterString
C++
void RegisterString(const std::string& ns, const std::string& key, const std::string& lang, const std::string& value)FindString
C++
const std::string* FindString(const std::string& ns, const std::string& key) constThe active language's translation of the key, or null. Does NOT walk the fallback: callers use this to ask whether a translation exists.
Resolve
C++
std::string Resolve(const std::string& ns, const std::string& key, const std::string& source) constActive language → fallback language → source.
ResolvePlural
C++
std::string ResolvePlural(const std::string& ns, const std::string& key, int64_t count, const std::string& source) constResolveSelect
C++
std::string ResolveSelect(const std::string& ns, const std::string& key, const std::string& form, const std::string& source) constGenerated from Arc/Core/CText.h via arc.json · Nov 5, 2026Version 1.0.0