Skip to main content

format_text

Function format_text 

Source
pub fn format_text(
    ctx: &Context,
    english: &str,
    values: &[(&str, impl AsRef<str>)],
) -> String
Expand description

Translate a message template and substitute its named, already-formatted values.

Unknown placeholders remain literal. Values are inserted once, so braces in a symbol, name or error message cannot become another substitution. Values may be borrowed or owned strings.