Skip to main content

tr

Function tr 

Source
pub fn tr(key: &str) -> String
Expand description

The text of translation key in the current language, or key itself when it has none — what Minecraft shows for an unknown key, so a missing translation is easy to spot. Call it each time the text is shown (e.g. while building a UI tree): the player can switch language at any time.