[#util-TranslatedLiteral] = xref:util.adoc[util]::TranslatedLiteral :relfileprefix: ../ :mrdocs: Compile‐time literal string that can be translated with an optional translation function. == Synopsis Declared in `<util/translation.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct TranslatedLiteral; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:util/TranslatedLiteral/2constructor.adoc[`TranslatedLiteral`] [.small]#[constructor]# | Capture a string literal and the translation function to use for it. | xref:util/TranslatedLiteral/2conversion-09.adoc[`operator bilingual_str`] | Convert to a bilingual_str holding both the original and translated text. | xref:util/TranslatedLiteral/2conversion-04.adoc[`operator std::string`] | Convert to a std::string, applying the translation function when set. |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:util/TranslatedLiteral/original.adoc[`original`] | The untranslated (English) literal text. | xref:util/TranslatedLiteral/translate_fn.adoc[`translate_fn`] | Pointer to the translation function to apply, or null for no translation. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:util/operator_plus-0b.adoc[`operator+`] | Prepend a translated literal to a value of the right operand's type. | xref:_.adoc[`::_`] | Translation marker macro helper: return the literal unchanged at compile time. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#