class

CTextLocalizationManager

Module
Arc
Header
#include "Arc/Core/CText.h"
Namespace
Arcf

Public functions

ReturnsNameDescription
CTextLocalizationManager&Get
voidSetLanguageSwitching 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
voidSetFallbackLanguage
const std::string&GetFallbackLanguage
boolIsRTL
uint32_tGetRevisionBumped on every language change; CText memoizes against it.
voidRegisterString
const std::string*FindStringThe active language's translation of the key, or null.
std::stringResolveActive language → fallback language → source.
std::stringResolvePlural
std::stringResolveSelect

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() const

SetFallbackLanguage

C++
void SetFallbackLanguage(const std::string& langCode)

GetFallbackLanguage

C++
const std::string& GetFallbackLanguage() const

IsRTL

C++
bool IsRTL() const

GetRevision

C++
uint32_t GetRevision() const

Bumped 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) const

The 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) const

Active language → fallback language → source.

ResolvePlural

C++
std::string ResolvePlural(const std::string& ns, const std::string& key, int64_t count, const std::string& source) const

ResolveSelect

C++
std::string ResolveSelect(const std::string& ns, const std::string& key, const std::string& form, const std::string& source) const
Generated from Arc/Core/CText.h via arc.json · Nov 5, 2026Version 1.0.0