class

CText

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

Constructors

SignatureNameDescription
CText() = defaultCText

Public functions

ReturnsNameDescription
CTextFromKeyNamespace + key with no authored source.
CTextFromStringTableThe LOCTEXT path: namespace, key and the English the key was authored from.
CTextFromStringTablePluralPlural form, chosen by the CLDR rule of the active locale from the key.one / key.few / key.many / key.other variants.
CTextFromStringTableSelectGender or any other select form, chosen from the key.<form> variants with key.other as the catch-all.
CTextFromStringUnlocalized literal — development only
CTextFormatFText-grade formatting: "{0}", "{name}", "{0}|plural(one=..,other=..)", "{0}|ordinal(..)", "{0}|select(..)" (see Mowo::FText::FormatArgs).
CTextFormat
TArcNamedArgument<std::decay_t<T>>ArgA named argument for "{name}": CText::Format(pattern, CText::Arg("hp", 42)).
CTextGetEmpty
const std::string&ToString
boolIsEmpty
boolIsLocalized
const std::string&GetNamespace
const std::string&GetKey
const std::string&GetSourceString
booloperator==
booloperator!=

Function details

CText

C++
CText() = default

FromKey

C++
static CText FromKey(const std::string& ns, const std::string& key)

Namespace + key with no authored source. An unresolved key surfaces as the key itself, which is the long-standing behaviour of this overload and what makes a missing translation visible in the UI.

FromStringTable

C++
static CText FromStringTable(const std::string& ns, const std::string& key, const std::string& source)

The LOCTEXT path: namespace, key and the English the key was authored from. Resolution walks active locale → fallback locale → this source string, so the text reads correctly before a single table has been loaded.

FromStringTablePlural

C++
static CText FromStringTablePlural(const std::string& ns, const std::string& key, int64_t count, const std::string& source)

Plural form, chosen by the CLDR rule of the active locale from the key.one / key.few / key.many / key.other variants. "{n}" in the winning pattern becomes the count.

FromStringTableSelect

C++
static CText FromStringTableSelect(const std::string& ns, const std::string& key, const std::string& form, const std::string& source)

Gender or any other select form, chosen from the key.<form> variants with key.other as the catch-all.

FromString

C++
static CText FromString(const std::string& literal)

Unlocalized literal — development only

Format

C++
template<typename... Args> static CText Format(const std::string& pattern, Args&&... args)

FText-grade formatting: "{0}", "{name}", "{0}|plural(one=..,other=..)", "{0}|ordinal(..)", "{0}|select(..)" (see Mowo::FText::FormatArgs). The pattern and the arguments are kept, not the result, so the text re-formats when the culture changes: a localized pattern re-resolves, a CText argument re-resolves, and numbers re-format with the new culture's separators and digits. Substitution is one pass, so an argument's own text is never searched for placeholders.

Format

C++
template<typename... Args> static CText Format(const CText& pattern, Args&&... args)

Arg

C++
template<typename T> static TArcNamedArgument<std::decay_t<T>> Arg(const std::string& name, T&& value)

A named argument for "{name}": CText::Format(pattern, CText::Arg("hp", 42)).

GetEmpty

C++
static CText GetEmpty()

ToString

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

IsEmpty

C++
bool IsEmpty() const

IsLocalized

C++
bool IsLocalized() const

GetNamespace

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

GetKey

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

GetSourceString

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

operator==

C++
bool operator==(const CText& other) const

operator!=

C++
bool operator!=(const CText& other) const
Generated from Arc/Core/CText.h via arc.json · Nov 5, 2026Version 1.0.0