Textualizer

A custom localization implementation for consistency between 1.8.9 - 1.21.

Редакция NLZONE · 2 мин чтения · 1 просмотр
Textualizer
Скачать Textualizer1.12.2 – 1.8.9 · с официальной страницы: modrinth.com
Перейти к загрузке

Что это

A custom localization implementation for consistency between 1.8.9 - 1.21.

  • Тип: мод
  • Загрузчик: fabric, forge, neoforge
  • Версии Minecraft: 1.12.2 – 1.8.9
  • Скачиваний на Modrinth: 8 028

Подробно

A simple localization management library.

Features a Minecraft-specific implementation for mod developers, wrapping around Minecraft's own localization system.

[](https://s.deftu.dev/discord) [](https://s.deftu.dev/kofi)

You need to add it as a dependency in your build.gradle(.kts) file. kt repositories { maven("https://maven.deftu.dev/releases") }

dependencies { modImplementation("dev.deftu:textualizer: ") }

Replace with the version of the library you want to use.

You'll need to implement Language, LocalizationContext, and Localization in your project. This means you need to handle language metadata, translation loading, translation retrieval, placeholder replacement, and language switching.

Refer to the Minecraft-specific implementation for an example of how to do this.

Why do I need this? Minecraft's (and Forge's) language management system is very buggy and inconsistent across several Minecraft versions. This library aims to provide a consistent and reliable way to manage translations in your mods.

Is it going to affect my FPS / performance? No. The library doesn't add anything which would affect performance outside the initial loading of the translations and language switching.

You need to add it as a dependency in your build.gradle(.kts) file. kt repositories { maven("https://maven.deftu.dev/releases") }

dependencies { modImplementation("dev.deftu:textualizer- - : ") }

Of course, replace with the version of Minecraft you are developing for, with the mod loader you are developing for, and with the version of the library you want to use.

Getting the current (selected in-game) language's context can be done like so: java import dev.deftu.textualizer.minecraft.MCLocalization;

LocalizationContext context = MCLocalization.current();

To obtain a translated string, you can use java import dev.deftu.textualizer.minecraft.MCLocalization;

LocalizationContext context = MCLocalization.current(); String text = context.get("com.example");

To obtain a translated string and replace your placeholders, you can use java import dev.deftu.textualizer.MCLocalization;

int number = 10; LocalizationContext context = MCLocalization.current(); String text = context.get("com.example", number);

This project is licensed under [LGPL-3.0][lgpl3]. © 2024 Deftu

[lgpl3]: https://www.gnu.org/licenses/lgpl-3.0.en.html

Как установить

Скачайте файл на официальной странице ниже и положите его в папку mods (для модов) или plugins (для плагинов) вашего сервера или клиента. Для модов нужен совместимый загрузчик. Версия должна совпадать с версией Minecraft.

Текст подготовлен автоматически из описания на Modrinth и ждёт проверки редакцией.

Редакция NLZONE

Пишем о серверах, модах и играх, в которые играем сами. Нашли ошибку — напишите нам, исправим.

Комментарии 0

Комментарии к этому материалу отключены.

Читайте также