Skip to content

Commit cc9dca5

Browse files
authored
Merge pull request #211 from Andre601/feat/add-lang_or-documentation
[Feat] Add documentation about lang_or
2 parents d930f1c + 5a88df7 commit cc9dca5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

source/minimessage/format.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,26 @@ Examples
236236
.. image:: /minimessage/images/translatable_2.png
237237
:alt: The result of parsing ``<lang:commands.drop.success.single:'<red>1':'<blue>Stone'>!``, shown in-game in the Minecraft client's chat window in English
238238

239+
Fallback
240+
++++++++
241+
242+
.. note::
243+
244+
The fallback option is only available since Minecraft 1.19.4.
245+
246+
Allows displaying minecraft messages using the player locale, or a fallback if no text is available
247+
248+
Tag
249+
:mm:`<lang_or:_key_:_fallback_:_value1_:_value2_...>`
250+
Aliases
251+
``tr_or``, ``translate_or``
252+
Arguments
253+
* ``_key_``, the translation key
254+
* ``_fallback_``, the fallback text to display
255+
* ``_valueX_``, optional values that are used for placeholders in the key (they will end up in the ``with`` tag in the JSON)
256+
Examples
257+
* :mm:`You should get a <lang_or:block.minecraft.diamond_block:'Dirt Block'>!`
258+
239259
Insertion
240260
*********
241261

0 commit comments

Comments
 (0)