Difference between revisions of "Datageneration/I18n"

From Forge Community Wiki
(Inital Creation short but the most important info should be there)
 
m (Minor grammar fixes)
Line 1: Line 1:
Lang Files can be generated by creating an extension of the File <code>LangurageProvider</code> class. From there you can add the Translations in the <code>addTranslations</code> Method, you must override.
+
Lang Files can be generated by creating an extension of the File <code>LangurageProvider</code> class. From there you can add the translations in the <code>addTranslations</code> method, which you must override.
  
To add a Translation you call the <code>LanguageProvider#add</code> method, this method takes the [[Internationalization|translation key]] and a String which is the displayname for the key.
+
To add a translation, call the <code>LanguageProvider#add</code> method. This method takes the [[Internationalization|translation key]] and a String which is the displayname for the key.

Revision as of 06:56, 13 February 2021

Lang Files can be generated by creating an extension of the File LangurageProvider class. From there you can add the translations in the addTranslations method, which you must override.

To add a translation, call the LanguageProvider#add method. This method takes the translation key and a String which is the displayname for the key.