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 Start[]
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 Legacy[]
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.
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 Renewed[]
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.
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.
Speechbanks[]
The new Curuquesta speech system in Renewed means that, among other improvements, speechbanks are now translatable! See the appropriate section for more information on this system. Mevans has also written some guidance on how best to approach translating speech:
Use your best judgment to sound natural: Translating the main language files is a fairly precise art. Mostly nouns, or simple phrases. The advice here has always been to render the original English into your language as faithfully as possible.
Speech, however, is more flexible - both formal and colloquial styles. It should sound natural in any language - and as you all know well, taking an English phrase and translating the words one-to-one doesn't always produce a good result.
The mod's English speechbanks are written to mimic a range of natural speaking styles. Therefore, when translating them into your language, you should try for the same. If the straightforward translation works well, that's great!
But if a literal, word-for-word translation sounds unnatural, try to translate the original line "by sense" not literally.
Where the English uses idioms, you can look for a similar idiom in your own language.
In summary: remember that translation is an art, not a science, and aim to reproduce the 'sense' if translating the literal meaning doesn't work well.
Read the books: If you want more guidance, I suggest going back to the source - read through The Lord of the Rings in your language, and see how those translators handled speech!
Don't be afraid to add, change, or delete lines: Following on from the above - unlike the main lang files, speech lines are not one-to-one. The engine does not require every English line to have a direct equivalent.
If you think of another good thing for the NPCs to say, add it! Add several!
Feel free to replace an English line with one that carries the same idea, but works better! And if you just can't make a line work, remove it.
Change a line's conditions if needed: Similar phrases in different languages may have very different connotations. You may decide that as you translate a line, the context needs to change. This is the strength of Conditional Speech - you can add, change, or remove conditions for a line as you translate it!
For example - I was told that in Chinese there is no direct equivalent for the greetings "good morning / afternoon / evening". These English lines use the "daytime" condition. Perhaps, in Chinese, it would be better to write a completely new set of lines that reflects the divisions of daily greetings in Chinese... You could use the "hour" condition instead of "daytime", e.g. "zao shang hao" when "hour": "<10" (from midnight until 10 A.M.) and "ni hao" when "hour": ">= 10" (from 10 A.M. all day and even until midnight)
All conditions and their values can be found here.
Use jsonlint to catch errors: This is a very useful site to validate json files. It's important for the main language files too, but especially for these new speechbanks which have a more complex format.
Before posting, paste your file into there and click "Validate JSON". If it's fine, it will show in green. Otherwise, it will show errors in red. Feel free to ask for help in the translations-discussion or technical-support channels on the mod's Discord server!
Please upload speechbanks in a zip file: Each speechbank folder is unique, but the language files inside are named after the language codes, e.g. "en_us.json". This means all speechbanks in your language will have the same filename! So if you just upload the json files it will be hard to tell which speechbank it is.
So please, to make it easier for both you and me, upload the whole speechbank folder structure in a .zip. Preserving the folder structure lets me merge it into the mod easily.
This also helps you if you are working on multiple speechbanks - you can post them all in one upload.
Submitting Your Translation[]
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 Considerations[]
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.
LotR Mod & Wiki Help
Mod help:
Mod Installation •
Configuration •
Compatible mods •
Creating a modded server |