Skip to main content

Translate

Substitutes the translation corresponding to the given key using the currently selected client-language while allowing to set placeholders in retrieved values as well as to provide a fallback if there was no value with the given key; this tag acts as a placeholder and must thereby be self-closing (does not accept content).

AttributeTypeMandatoryDescription
key ScalaryesPath of translation
with Markup-ListnoPlaceholder-values
fallback MarkupnoFallback if non-existent
<translate
key="chat.type.advancement.challenge"
with={
<green>Username</green>
}
with={
<green>Challenge-Name</green>
}
fallback={
<red>Could not locate key</red>
}
/>