Basic Modding - Language File


I want to show you how to add language files to your mod.


0/10 - Very simple


  • You need to have some items or blocks to add a name to.

Forge Version

This Tutorial was created with Forge for Minecraft 1.8. If anything doesn't work with other versions, please contact me!

Adding a language file

To add a language file, we first need to add a new folder called "lang". This folder needs to be placed in WorkspaceRoot/src/resources/assets/<modid>/lang.

In this folder we need to create a file for each language you mod should support. The default language file which each mod should contain is en_US.lang.

We create this file and open it with an editor. I'd recommend using notepad++ because this is the only one I know which can change the encoding of the file easily.


One very important thing about the language files is the encoding: Minecraft only supports the encoding "UTF-8 without BOM" so we need to set this in the editor. If we use another encoding, some special letters (for instance the german ä, ö, ü) might be encoded wrong.


The structure of the language file is rather easy. Each line assigns an unlocalized name with a translated name. First write the unlocalized name followed by a "=" but without whitespace! After the "=" we can write your translated name - also without whitespace between the "=" and the first letter.


To find out the unlocalized name of a block or item we can either take a look how the block or item is named without a translation or we remember the naming convention of minecraft.

A block always has the unlocalized name "". UnlocalizedName is the name you set for the block with setBlockName();.

An item is always named "" when unlocalizedName is the name you set for the item with setUnlocalizedName();.


For my tutorialItem and tutorialBlock the language file looks like this:

en_US.lang: Item Block

To make the file easier to read we can add empty lines to structure the code.

Also its useful to add a header line which tells the reader something about the file, but this is not necessary.

optional header:
< en_US.lang - English localization file for the mod Tutorial >

If we now start minecraft your blocks and items should be named. If not, check if you refreshed your workspace in eclipse by right-clicking on your project and selecting "Refresh".

You can download the code used in this tutorial from here.

Recommended tutorials to continue with

Take a look at the tutorial overview and find out what you want to do next!

Comments and Questions:

If you want to report modding problems, please make sure to include the code in a pastebin link or something else! Don't just write "It doesn't work", otherwise your post will be deleted. For more complicated problems, please use the troubleshooter form.