use of org.lanternpowered.server.text.translation.MinecraftTranslationManager in project LanternServer by LanternPowered.
the class TranslationManagerRegistryModule method registerDefaults.
@EarlyRegistration
@Override
public void registerDefaults() {
this.translationManager = new CombinedTranslationManager();
// Get the asset repository
final AssetRepository assetRepository = Lantern.getAssetRepository();
// Add the translation manager as a reload listener
assetRepository.addReloadListener(this.translationManager);
// Add the minecraft language file for defaults and
// the client translations
this.translationManager.addManager(new MinecraftTranslationManager());
final LanternTranslationManager lanternTranslationManager = new LanternTranslationManager();
// Add the lantern languages
lanternTranslationManager.addResourceBundle(assetRepository.get("lantern", "lang/en_us.properties").get(), Locale.ENGLISH);
this.translationManager.addManager(lanternTranslationManager);
this.translationManager.setDelegateManager(lanternTranslationManager);
}
Aggregations