Перейти к содержимому
Mineforgian

Textualizer

A custom localization implementation for consistency between 1.8.9 - 1.21.

7K загрузок4 подписчиковLGPL-3.0-or-laterfabricforgeneoforge

Обновлён 7 апреля 2025 г. · опубликован 9 июля 2024 г.

Textualizer

A simple localization management library.

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


Discord Badge Ko-Fi Badge


For developers

Setup

You need to add it as a dependency in your build.gradle(.kts) file.

repositories {
    maven("https://maven.deftu.dev/releases")
}

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

Replace <VERSION> with the version of the library you want to use.

Usage

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.


For Minecraft mod users

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.


For Minecraft mod developers

Setup

You need to add it as a dependency in your build.gradle(.kts) file.

repositories {
    maven("https://maven.deftu.dev/releases")
}

dependencies {
    modImplementation("dev.deftu:textualizer-<MINECRAFT VERSION>-<MOD LOADER>:<VERSION>")
}

Of course, replace <MINECRAFT VERSION> with the version of Minecraft you are developing for, <MOD LOADER> with the mod loader you are developing for, and <VERSION> with the version of the library you want to use.

Usage

Getting the current (selected in-game) language's context can be done like so:

import dev.deftu.textualizer.minecraft.MCLocalization;

LocalizationContext context = MCLocalization.current();

To obtain a translated string, you can use

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

import dev.deftu.textualizer.MCLocalization;

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

BisectHosting


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

Версии

ВерсияКаналИграЗагрузчикиДатаСкачать
0.4.0+1.8.9-forgeБета1.8.9forge7 апреля 2025 г.Скачать (44 КБ)
0.4.0+1.8.9-fabricБета1.8.9fabric7 апреля 2025 г.Скачать (45 КБ)
0.4.0+1.21.4-neoforgeБета1.21.4neoforge7 апреля 2025 г.Скачать (48 КБ)
0.4.0+1.21.4-fabricБета1.21.4fabric7 апреля 2025 г.Скачать (48 КБ)
0.4.0+1.21.3-neoforgeБета1.21.3neoforge7 апреля 2025 г.Скачать (48 КБ)
0.4.0+1.21.3-fabricБета1.21.3fabric7 апреля 2025 г.Скачать (49 КБ)
0.4.0+1.21.2-neoforgeБета1.21.2neoforge7 апреля 2025 г.Скачать (48 КБ)
0.4.0+1.21.2-fabricБета1.21.2fabric7 апреля 2025 г.Скачать (49 КБ)
0.4.0+1.21.1-neoforgeБета1.21.1neoforge7 апреля 2025 г.Скачать (48 КБ)
0.4.0+1.21.1-fabricБета1.21.1fabric7 апреля 2025 г.Скачать (49 КБ)
0.4.0+1.20.6-neoforgeБета1.20.6neoforge7 апреля 2025 г.Скачать (48 КБ)
0.4.0+1.20.6-fabricБета1.20.6fabric7 апреля 2025 г.Скачать (49 КБ)
0.4.0+1.20.4-neoforgeБета1.20.4neoforge7 апреля 2025 г.Скачать (48 КБ)
0.4.0+1.20.4-forgeБета1.20.4forge7 апреля 2025 г.Скачать (49 КБ)
0.4.0+1.20.4-fabricБета1.20.4fabric7 апреля 2025 г.Скачать (49 КБ)

Показаны последние 15 из 135 версий.

Ченджлог

0.4.0+1.8.9-forgeБета1.8.9 · 7 апреля 2025 г.

No changelog provided.

0.4.0+1.8.9-fabricБета1.8.9 · 7 апреля 2025 г.

No changelog provided.

0.4.0+1.21.4-neoforgeБета1.21.4 · 7 апреля 2025 г.

No changelog provided.

0.4.0+1.21.4-fabricБета1.21.4 · 7 апреля 2025 г.

No changelog provided.

0.4.0+1.21.3-neoforgeБета1.21.3 · 7 апреля 2025 г.

No changelog provided.

0.4.0+1.21.3-fabricБета1.21.3 · 7 апреля 2025 г.

No changelog provided.

0.4.0+1.21.2-neoforgeБета1.21.2 · 7 апреля 2025 г.

No changelog provided.

0.4.0+1.21.2-fabricБета1.21.2 · 7 апреля 2025 г.

No changelog provided.

Комментарии

Загружаем…