Difference between revisions of "Datageneration/I18n"

From Forge Community Wiki
m (Minor grammar fixes)
(Categorize with Category:Data Generation by SizableShrimp#0755)
 
(One intermediate revision by one other user not shown)
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, which you must override.
+
Lang Files can be generated by creating an extension of the file <code>LanguageProvider</code> class. From there you can add the translations in the <code>addTranslations</code> method, which you must override.
  
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.
+
To add a translation, call the <code>LanguageProvider#add</code> method. This method takes the [[Internationalization|translation key]] and a string that is the displayname for the key.
 +
 
 +
 
 +
[[Category:Data Generation]]

Latest revision as of 00:59, 19 May 2021

Lang Files can be generated by creating an extension of the file LanguageProvider 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 that is the displayname for the key.