util::TranslatedLiteral

Compile-time literal string that can be translated with an optional translation function.

Synopsis

Declared in <util/translation.h>

struct TranslatedLiteral;

Member Functions

NameDescription
TranslatedLiteral [constructor]Capture a string literal and the translation function to use for it.
operator bilingual_str Convert to a bilingual_str holding both the original and translated text.
operator std::string Convert to a std::string, applying the translation function when set.

Data Members

NameDescription
original The untranslated (English) literal text.
translate_fn Pointer to the translation function to apply, or null for no translation.

Non-Member Functions

NameDescription
operator+Prepend a translated literal to a value of the right operand's type.
::_Translation marker macro helper: return the literal unchanged at compile time.