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

Synopsis

Declared in <util/translation.h>

struct TranslatedLiteral;

Member Functions

Name

Description

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

Name

Description

original

The untranslated (English) literal text.

translate_fn

Pointer to the translation function to apply, or null for no translation.

Non-Member Functions

Name

Description

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.

Created with MrDocs