tr

fun String.tr(): String

This function does the actual translation work, using an instance of Translations stored in UncivGame.Current

Receiver

The string to be translated, can take three forms: plain - translated directly by hashset lookup placeholders - contains at least one '[' - see below sentences - contains at least one '{' - phrases between curly braces are translated individually Additionally, they may contain conditionals between '<' and '>'

Return

The translated string defaults to the input string if no translation is available, but with placeholder or sentence brackets removed.

Sources

jvm source
Link copied to clipboard