Changes

Copy Internationalization to MC1.16 archive
Line 5: Line 5:  
Localization will happen in the game’s locale. In a Minecraft client the locale is specified by the language settings. On a dedicated server, the only supported locale is <code>en_us</code>. A list of available locales can be found on the [https://minecraft.gamepedia.com/Language#Available_languages Minecraft Wiki].
 
Localization will happen in the game’s locale. In a Minecraft client the locale is specified by the language settings. On a dedicated server, the only supported locale is <code>en_us</code>. A list of available locales can be found on the [https://minecraft.gamepedia.com/Language#Available_languages Minecraft Wiki].
   −
{{Tip/Important|The only purpose of a translation key is internationalization. Do not use them for logic, such as comparing if two blocks are equal. Use their [[Registration|registry names/1.16]] instead.}}
+
{{Tip/Important|The only purpose of a translation key is internationalization. Do not use them for logic, such as comparing if two blocks are equal. Use their [[Registration/1.16|registry names]] instead.}}
    
== Language files ==
 
== Language files ==
Line 39: Line 39:  
<h3 id="I18n"><tt style="font-size: 100%">net.minecraft.client.resources.I18n</tt></h3>
 
<h3 id="I18n"><tt style="font-size: 100%">net.minecraft.client.resources.I18n</tt></h3>
   −
{{Tip/Danger|'''This I18n class can only be found on the [[Sides#Different_Kinds_of_Sides|physical client/1.16]]!''' It is intended to be used by code that only runs on the client. Attempts to use this on a server will throw exceptions and crash.}}
+
{{Tip/Danger|'''This I18n class can only be found on the [[Sides#Different Kinds of Sides/1.16|physical client]]!''' It is intended to be used by code that only runs on the client. Attempts to use this on a server will throw exceptions and crash.}}
    
<code>format(String, Object...)</code> localizes in the client’s locale with formatting. The first parameter is a translation key, and the rest are formatting arguments for <code>String.format(String, Object...)</code>.
 
<code>format(String, Object...)</code> localizes in the client’s locale with formatting. The first parameter is a translation key, and the rest are formatting arguments for <code>String.format(String, Object...)</code>.
Line 50: Line 50:       −
[[Category:Common Concepts/1.16]]
+
[[Category:Common Concepts/1.16|Category:Common Concepts]]
372

edits