FANDOM


Welcome! This tutorial is to help members of the mod community translate the mod into other languages.

In order to get started, you will need a copy of the latest version of the mod, a text editing program, (Notepad++ or a similar lightweight plain text editor is recommended), and the ability to read and write competently in the language you choose to translate the mod into.

Before You StartEdit

Before you begin translating, it's important that you make sure others are not already translating the mod into the language you've chosen. The LOTR Mod Wiki Discord has a translations channel where you can ask about other translation teams. If someone is already providing translations in a specific language, ask if you can join their team, or consider translating the mod into a different language.

Translating for LOTR Mod LegacyEdit

Step one for translating LOTR Mod Legacy is to acquire the base .lang file, .lang being the format translations are stored in in pre-1.8 Minecraft. Open the mod .jar file with a program such as 7zip or Win.rar. navigate to "LOTRMod v.XX.X.jar\assets\lotr\lang". select the .lang file named "en_us.lang". This is the base language file, containing the text for every item, waypoint description, and other text within the mod. You will be editing this file to translate it into your chosen language.
En US lang file for 1.7.10 version
The .lang file can be opened in any text editor, although a plain text editor is best.

Each line of the file has a format much like this:

 tile.lotr:rock.0.name=Mordor Rock 

The first half of this line is the internal name for the object. This remains as it is. You are concerned about the second half: in the above case, the object tile.lotr:rock.0 is being assigned the name of "Mordor Rock". It is this part which you are to translate into your language of choice. For the most part all you have to do is replace the assigned name with the equivalent in your language.

There are some cases where it is inappropriate to translate a particular name, which will be discussed below. In addition, some texts, such as fast travel messages or GUIs for various blocks or units will have symbols such as "%s", "%d" or "%2$s", among others. These symbols should not be removed. They are for inserting things like unit names, item trader prices, or other changing information into the text. Look at where they are placed within the sentences of the untranslated text, and place them in the grammatically correct location for your translation. Removing or editing them will most certainly break things. If there are only a few things that need to be translated (such as when translating to dialects, like British vs American English), it is possible to remove all lines that do not require translation. So long as the overall format is preserved, any lines which do not need translation can be removed entirely. This single line of text could be a valid and complete translation file:

tile.lotr:oreStorage.14.name=Block of Nitre

Once you have translated everything that needs to be translated, and have checked your work for errors, save your work. Your file should be named after your language's locale code. This is a 4 letter code separated into two groups of two letters. Generally, the first two letters represent the primary language, while the last 2 letters represent the dialect or branch of the language. For instance, the locale code for US English is "en_US", while the code for British English is "en_GB". The accepted locale codes can be found here. Note that if Minecraft does not have a translation for a specific locale code, LOTR mod translations to that locale code will not work. The file should be saved as a .lang file, with the final name being something along the lines of "xx_XX.lang".

Translating for LOTR Mod RenewedEdit

Translating for LOTR Mod Renewed is very similar to doing so for Legacy version, although there are some significant differences in format. First, open the mod's .jar file with a program like 7zip or Win.rar. Navigate to "LOTR-X.XX-Renewed-x.x.jar\assets\lotr\lang". Select the "en_us.json" file to open in your text editor. This is the base file, containing the text for every item or block name, waypoint descriptions, or other information within the mod. Upon first opening the file, it may look rather messy, but finding an online JSON formatter and running the text through will make it much more readable.
Before vs after json formatting

Each line within this file has two parts: an internal name and the display name. "block.lotr.gondor_rock": "Gondor Rock", here, the internal name is "block.lotr.gondor_rock". As the translator, you leave this part alone. it is the second part you are concerned with: after the colon is the display name for the object, in this case "Gondor Rock". This is the part you translate to your language. When doing so, make sure you keep the display name within double quotation marks, and ensure that there is a comma after every entry, just like you found it (many editors have json syntax highlighting which does validation as well, which makes this easier). Accidentally removing these will result in errors with your translation. In addition, some of the text will have symbols such as "%s", "%d", or "%2$s", among others. These symbols should not be removed. They are for inserting things like unit names, item trader prices, or other changing information into the text. Look at where they are placed within the sentences of the untranslated text, and place them in the grammatically correct location for your translation. Removing or editing them will most certainly break things.

If there are only a few things that need to be translated (such as when translating to dialects, like British vs American English), it is possible to remove all lines that do not require translation. So long as the JSON format is preserved, any lines which do not need translation can be removed entirely. Since it still includes the brackets, quotation marks, and commas required for the JSON format, this would be a valid and complete translation file:

 {
     "block.lotr.sulfur_ore": "Sulphur Ore",
     "block.lotr.sulfur_block": "Block of Sulphur"
 }
     

Once you have translated everything that needs to be translated, and have checked your work for errors, save your work. Your file should be named after your chosen languages locale code. This is a 4 letter code separated into two groups of two letters. Generally, the first two letters represent the primary language, while the last 2 letters represent the dialect or branch of the language. For instance, the locale code for US English is "en_US", while the code for British English is "en_GB". Acceptable locale codes can be found here. Note that if Minecraft does not have a translation for a specific locale code, LOTR mod translations to that locale code will not work. The file should be saved as a .json file, with the final name being something along the lines of "xx_XX.json". It is highly recommended that you run your final translation through a JSON validator online, which will check to make sure that there are no errors in the JSON formatting.

Submitting Your TranslationEdit

Once you have finished your translation, you can submit it on the official wiki discord, found on the sidebar to the right. Enter the discord server, request the translator role from #role-assignment according to the directions, and then upload your translation in the #translations channel.

Stylistic ConsiderationsEdit

Note that translators are translating the mod, not adapting it. Use the best representation of the English translation text in your language. Don't translate to Quenya or the Black Speech. These languages have their own translation files.

Community content is available under CC-BY-SA unless otherwise noted.