Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

This is a mod powered by Mixin which enables localization of hardcoded texts.
Its purpose is to give the community the option to play their favorite modpack in their language.
Players just need to have the corresponding Resource Pack and everything will be shown in their language. How awesome is that?
And by extension, modpack creators will multiply their user base! WIN-WIN!

This mod requires Fermium Booter!

On first run, every Mixin is disabled by default, so when a new update comes up, you can enable the new mixins, restart and enjoy.
You can enable all Mixins if you want. If a corresponding mod doesn't exist in your instance, its Mixin won't load and everything will run as expected.

This mod:

  • Adds missing localization functionality to MC 1.12.2
  • Localizes hardcoded texts in many mods
  • Bonus: Applies little QoL fixes in some mods (this is not the purpose of Localizator, but I just HAD to fix them).

Check the Images section for clear examples!

Since I'm a Spanish speaker, most of them are in Spanish, so you can experience the differences from a non-english player's perspective.

For the complete list of included Mixins, check the spoiler below!

Spoiler
  • (Armor Underwear)  Localizes the "MILD / WARM / COOL" tooltip texts on armor parts with Oxxy Liner.
  • (Battle Towers)  Localizes the message when the Golem is defeated.
  • (Better Survival)  Localizes the "hits remaining" tooltip text on potion-imbued weapons.
  • (Bountiful Baubles)  Adds an option to prevent Modifier of being added to the Bauble name.
  • (Bountiful Baubles)  Adds cobweb immunity to Ankh Charm and Ankh Shield (because it makes sense to me).
  • (Callable Horses)  Localizes all messages when connected to a server.
  • (Charm)  Localizes all cakes names.
  • (Charm)  Localizes the Composter JEI usage screen texts. Localizes MesonGuiContainer's displayName.
  • (Corpse Complex)  Localizes the Grave Scroll description.
  • (Dynamic Trees)  Removes the weird symbols on Staff tooltip.
  • (Fancy Block Particles)  Localizes its Keybind screen texts.
  • (Fishing Made Better)  Localizes Fish name and information. Adds a JEI Plugin for Fish Requirments.
  • (Forge FML)  Localizes the Mod List screen.
  • (Forgotten Items)  Localizes all items descriptions.
  • (iChunUtils)  Patches an exception when trying to reach an invalid URL.
  • (Item Physics)  Fixes the "ERRORED" text when looking at Armor Underwear items.
  • (Item Physics)  Localizes the "Power:" status message when throwing items.
  • (Item Physics)  Fixes item description being shown in reverse order.
  • (LevelUp! 2)  Localizes its Keybind screen texts.
  • (Lycanites)  Localizes messages and status messages when connected to a server.
  • (Minecraft)  Translates Boss names if a language key exist (including CustomName tag).
  • (Minecraft)  Makes LocName NBT tag support lang keys with arguments!
  • (Minecraft)  Adds the LocLore NBT tag for localized item lore. And it supports lang keys with 1 argument!
  • (Minecraft)  Adds the locTitle and locAuthor NBT tags for localized Written Books.
  • (Minecraft)  Translates entity's CusomName tag contents.
  • (Minecraft)  Localizes Biome names.
  • (Minecraft)  New "locPages" NBT tag, to localize Writable Books.
  • (Minecraft)  Localizes TileEntityLockable's CustomName.
  • (Mo' Bends)  Localizes its Keybind screen texts.
  • (Neat)  Translates entity's CustomName tag contents on its Health Bar.
  • (Recurrent Complex)  Localizes artifact's random names (120,960 possible combinations!).
  • (Rough Tweaks)  Makes its item's language keys unique, so they don't collide with First Aid's.
  • (Rough Tweaks)  Adds an option to show the items hidden description.
  • (Scaling Health)  Localizes its Keybind screen texts.
  • (Spartan Weaponry)  Localizes the "Material Bonus:" hardcoded tooltip text.
  • (SRParasites)  Localizes parasite armor's hardcoded "Current Adaptation" and "reduction" tooltip texts.
  • (SRParasites)  Adds an option to translate the resisted damage sources (for non-entity ones, you need to add the corresponding language keys).
  • (Trinkets & Baubles)  Localized Ender Queen's messages and the "Weight:" tooltip text on armor when transformed in Faelis.
  • (Varied Commodities)  New "locPages" NBT tag, to localize Writable Books.
  • (WAILA's fork "Hwyla")  Translates entity's CustomName tag contents.

.

So what does localization even mean?
By definition: "Adapting a piece of content's full meaning for a new region, including translation, that influence how your content will be perceived."
The way Minecraft accomplish this is by using language (.lang) files.
So, if a language key is asociated to a text, it means it can be shown in a different language (is the user has the corresponding Resource Pack).

This is the core of Localizator: Create language keys for texts that are hardcoded (fixed in the mod's code).

.

Modpack creators, check the spoiler below!

Spoiler

So you worked so hard to include rare items with Custom Name and Description (Lore),   Or maybe bosses or special creatures with Custom Names,  Or Written Books / Writable Books which tell your modpack's lore,  And also want everyone around the world to connect to your server, and see your modpack in their own language?

Then, Localizator is for you!

Localized Item Custom Name

Now, how do you localize an item's custom name?

Minecraft has the (not documented) LocName NBT tag (under the display tag), which lets you assign a custom, localizable name to a Vanilla or modded item.

The structure is as follows:

{
	display:
	{
		LocName: "your.lang.key"
	}
}

Test it now with the following command:
   /give @p stone 1 0 {display:{LocName:"tile.stone.andesiteSmooth.name"}}

Optional:

Now, if for some reason you need the localized name to have fixed words on it, Localizator adds the new LocNameArgs list NBT tag (also under the display tag), so:

{
	display:
	{
		LocName: "your.lang.key",
		LocNameArgs: ["Word1","Word2"]
	}
}

The lang key would look like this:
your.lang.key=%s, the Awesome Sword
and in the LocNameArgs list, you put ["Excalibur"].
or if you want to use more arguments:
your.lang.key=Subscribe to %1$s to win %2$s cookies!
and in the LocNameArgs list you put ["KameiB","7"].

.

This was needed to localize Recurrent Complex's artifact names, so better have it and not needing it, right?
Test it now with the following command:
   /give @p minecraft:iron_helmet 1 0 {display:{LocName:"item.reccomplex.chaotic.Helm.chaotic.name",LocNameArgs:["Shelly","KameiB"],Name:"Shelly, the Helm of KameiB"}}

You can add both Name and LocName NBT tags in your items if you want, for Vanilla clients support.

Localized Item Lore

Localizator adds a new NBT tag, called LocLore, which works exactly the same as Vanilla's LocName.
The structure is as follows:

{
	display:
	{
		LocLore: ["your.lang.key"]
	}
}

Test it now with the following command:
   /give @p stone 1 0 {display:{LocLore:["tile.shulkerBoxGray.name"]}}

  • But what if my server accepts vanilla clients?
    Don't worry! you can still add the Lore tag AND my LocLore tag!
    Vanilla will ignore the LocLore tag because it doesn't know it.
    And Localizator will make LocLore contents override Lore contents! (this option is toggleable)
{
	display:
	{
		LocName: "your.lang.key",
		Lore: ["Awesome Lore"],
		LocLore: ["your.lang.key"]
	}
}

Test it now with the following command:
   /give @p stone 1 0 {display:{LocName:"tile.stone.andesiteSmooth.name",Lore:["Awesome lore"],LocLore:["tile.shulkerBoxGray.name"]}}

LocLore also supports lang keys with arguments, but is limited to 1 and only 1 argument, per lore line.
This was to avoid unnecessary complexity with the NBT tags.
The LocLoreArg NBT list tag must be a list of strings, and must be the same size as the LocLore list.
This is the structure:

{
	display:
	{
		LocLore: ["your.lang.key"],
		LocLoreArg: ["Word"]
	}
}

The lang key would look like this:
your.lang.key=%s, the Awesome Sword and in the LocLoreArg list, you put ["Excalibur"].
Test it now with the following command:
   /give @p minecraft:golden_sword 1 0 {display:{LocLore:["event.boss.finished_"],LocLoreArg:["KameiB"]}}

Localized Written Book

First, let's look at a normal Written Book (you might want to check the Wiki):

{
	pages:
	["
		{
			"text" : "Do not run but hide as they will come."
		}
	"],
	title: "At Twilight",
	author: "The Dark Witch"
}

Now let's get into it!

Pages: Minecraft natively supports raw json format for the page contents.
This means you can use "translate" instead of "text" and a lang key for each page!

Title: Localizator adds the locTitle NBT tag, which supports lang keys.

Author: Localizator adds the locAuthor NBT tag, which support lang keys.

This is how a FULLY localized Written Book looks like:

{
	pages:
	["
		{
			"translate": "book.lang.key.page.1"
		}
	"],
	locTitle: "book.lang.key.title",
	locAuthor: "book.lang.key.author"
}

Test it now with the following command (you might need a Command Block!)
   /give @p written_book 1 0 {pages:["{"translate":"book.localizator.Example.page.1"}"],locTitle:"book.localizator.Example.title",locAuthor:"book.localizator.Example.author"}

What? You want to add lore AND also support vanilla clients? Well, here it comes!

{
	pages:
	["
		{
			"translate": "book.localizator.Example.page.1"
		}
	"],
	locTitle: "book.localizator.Example.title",
	title: "This is a book",
	locAuthor: "book.localizator.Example.author",
	author: "KameiB",
	display:
	{
		LocLore: ["book.localizator.Example.lore"],
		Lore:["Awesome lore"]
	}
}

Test it with the following command (you WILL need a Command block!):
   /give @p written_book 1 0 {pages:["{"translate":"book.localizator.Example.page.1"}"],locTitle:"book.localizator.Example.title",title:"This is a book",locAuthor:"book.localizator.Example.author",author:"KameiB",display:{LocLore:["book.localizator.Example.lore"],Lore:["Awesome lore"]}}

Vanilla will ignore my tags, and Localizator will make my tags override Vanilla ones. Beautiful!

And yes, these tags are interchangeable! which means you can also do this:

{
	pages:
	["
		{
			"translate": "book.localizator.Example.page.1"
		}
	"],
	locTitle: "book.localizator.Example.title",
	author: "KameiB",
	display:
	{
		Lore: ["Awesome lore"]
	}
} 

/give @p written_book 1 0 {pages:["{"translate":"book.localizator.Example.page.1"}"],locTitle:"book.localizator.Example.title",author:"KameiB",display:{Lore:["Awesome lore"]}}

Just remember, a Written book must have a Title (locTitle / title) to be valid!

Localized Writable Book
This one only needs the pages NBT tag, so you only need to add the new locPages NBT tag with its respective lang keys, and players will see the contents in their own language!

Localized Entity Name

(At this point, this should be a piece of cake for you!)
With Localizator, you can also use a language key inside an Entity's CustomName NBT tag!
So, instead of doing this:

{
	CustomName: "Eagle - The Founder"
}

you can do this:

{
	CustomName: "entity.dregorarl.Eagle.name"
}

This also works for bosses! Try it!
   /summon minecraft:wither ~ ~ ~ {CustomName:"entity.localizator.KameiB.name"}

I reuse Vanilla's CustomName tag because creating a different tag for a localized entity name would be very complicated (at least for me).
So, if you want to keep support for Vanilla clients, there's a cheezy way to accomplish the desired result:
Make a lang key with the exact name that your Entity has. That's it.
That's what I had to do to translate bosses when connected to a server, and it also works for Lycanite's event creatures, like Satan Claws, etc.
So, your language key would look like this:
Satan Claws=Satán Claus

Trust me, it works lol.

Localized Biome Name

Lang keys for biome names must have this structure:
biome.<mod_name>:<biome_resource_location>.name
Example:
biome.traverse:autumnal_woods.name=Autumnal Woods
You can get a list of all registered biomes using CraftTweaker's /ct biomes command.

External resources



Project members

KameiB

Member


Technical information

License
MIT
Client side
required
Server side
required
Project ID