User Tools

Site Tools


zh_cn:tutorial:datagen_language

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

zh_cn:tutorial:datagen_language [2024/06/04 17:08] – created sjk1949zh_cn:tutorial:datagen_language [2024/06/04 17:11] (current) – fix language mistake sjk1949
Line 3: Line 3:
 您可以从支持翻译关键字的现有语言文件和类中生成翻译条目。 您可以从支持翻译关键字的现有语言文件和类中生成翻译条目。
  
-首先,创建一个扩展 ''FabricLanguageProvider'' 的类,并实现如下基本方法:+首先,创建一个继承 ''FabricLanguageProvider'' 的类,并实现如下基本方法:
  
 <code java> <code java>
 private static class MyModEnglishLangProvider extends FabricLanguageProvider { private static class MyModEnglishLangProvider extends FabricLanguageProvider {
  private MyModEnglishLangProvider(FabricDataOutput dataGenerator) {  private MyModEnglishLangProvider(FabricDataOutput dataGenerator) {
-                // 声明en_us是可选择的,默认情况下该参数为en_us+                // en_us 是可选参数,默认情况下该参数为 en_us
  super(dataGenerator, "en_us");  super(dataGenerator, "en_us");
  }  }
zh_cn/tutorial/datagen_language.1717520938.txt.gz · Last modified: 2024/06/04 17:08 by sjk1949