Skip to main content

format

Function format 

Source
pub fn format(locale: Locale, key: &str, params: &[(&str, Param<'_>)]) -> String
Expand description

The message for key in locale with params filled in, exactly as the page’s t(key, params) would return it: an en key that is missing falls back to zh, a key that is missing everywhere comes back as the key itself, and a placeholder whose name is not among params stays in the text as written.