The 1.3 release of KSP introduces localization, which allows in-game text to be translated to other languages. This allows more people to enjoy the game in their preferred language and enlarges the community. However, it does not happen automatically for mods; by default, a mod will appear in English regardless of the language of the base game. In order to have both the base game and mods available in the same non-English languages, some additional work must be done by the modder.
Unfortunately, I only speak English, and I maintain this mod for free. This means I cannot create my own translations, and I cannot pay a professional translation service to produce high quality translations. The best I can do on my own is to use Google Translate, which is of dubious value for the terse, idiomatic strings needed in a KSP mod's UI. Instead, I must rely on the expertise of you, the multilingual KSP mod user, to tell me what good translations look like for your language. If you would like to help in this effort, please keep reading to learn how the mod's language files are structured and how to submit translations for use by others.
Note: Even though you will appear to be editing the project's files, don't worry about making mistakes. Github will keep your changes separate from the main files until I have verified that they are OK to use. It is even possible for me to ask questions or request changes before your work is committed to the main files.
- American English <en-us.cfg>
- Brazilian <pt-br.cfg>
- Chinese (中文) <zh-cn.cfg>
- German (Deutsch)
- Spanish (Español)
- French (Français) <fr-fr.cfg>
- Italian (Italiano) <it-it.cfg>
- Japanese(日本語) <ja.cfg>
- Korean (한국어) <ko.cfg>
- Mexican (Mexicano) <es-mx.cfg>
- Dutch <nl-nl.cfg>
- Norwegian (Norsk) <no-no.cfg>
- Polish (Polski) <pl.cfg>
- Russian (Русский) <ru.cfg>
- Swedish (Svenska) <sw-sw.cfg>
- Taiwanese (国语) <zh-tw.cfg>
It is recommended to make your changes on your own computer at first so you can test them before uploading, especially if you are creating a new translation from scratch.
- Install the current release of xxx mod if you have not already
- Open your
Kerbal Space Program/GameData/xxxMod/Localization
folder on your local disk - Look for a file called lang.cfg, where lang is KSP's name for your locale; as of KSP 1.3, this includes:
- en-us (English)
- es-es (Spanish)
- ja (Japanese)
- ru (Russian)
- zh-cn (Chinese)
The remaining steps are different depending on whether the file already exists:
Follow these steps to make improvements to an existing translation:
- Edit the file for your language in your favorite text editor
- Make the changes you wish to see in-game (see the File format section below for details)
- Save your changes
- Remember to test your changes!
Follow these steps to start your own translation from scratch:
- Make a copy of
en-us.cfg
in theLocalization
folder - Rename the file according to the list of languages above
- Edit the file for your language in your favorite text editor
- Change the third line from
en-us
to the string for your language - Translate each string from English to your language (see the File format section below for details)
- Save your changes
- Remember to test your changes!
The middle part of the cfg
file contains the strings to translate. The format is name = translation
, where the name is a special string defined by the mod. For example:
#launchSubtitle = Transfers from <<1>>\n(Launch ~<<2>>)
Do not change the part to the left of the equals sign ("=")! These names must be the same in every language file.
The part to the right of the equals sign is the string to be used in-game. Most of the text will be shown as-is, but it can contain a few special strings as shown in the Lingoona grammar module demo:
String | Purpose |
---|---|
\n | Line break; try to preserve these based on the original strings to make sure the strings will fit |
<<1>> | The first substitutable token in the string, will be replaced by a number, name of a planet, etc., depending on the string |
<<2>> | Second token, and so on |
<<A:1>> | The first token, but substituted with a proper article |
For example, this is a possible translation of the above line into Spanish, courtesy of Google Translate:
#launchSubtitle = Transferencias desde <<1>>\n(Lanzamiento ~<<2>>)
It's important to make sure that your changes work correctly. If you use Steam:
- Select the language to use in Steam
- Wait for the language pack download to complete
- Run KSP
- Use the xxxMod ingame and make sure your changes appear as you intended
If you do not use Steam, I don't know the steps to choose a language. Contact SQUAD if you can't figure it out.
After you have prepared a cfg
file for your language and confirmed that it works as you intend, if you are willing to contribute it for redistribution under the xxxModd's license, follow these steps to upload it for inclusion in the main mod distribution:
- Log in to Github; you may need to register an account if you do not already have one
- Navigate to the xxxMod's Localization folder
- Look for the file you edited
The remaining steps are different depending on whether the file already exists:
- Click the file's name to view it
- Click the pencil icon to edit
- Replace the text with the pasted contents of the file you edited locally
- Important: At the bottom of the page, under Propose file change, type an English description of the changes you have made and the reason you think they should be made. This will help me to confirm that your changes are appropriate. Remember, I do not speak the language in the
cfg
file, so I need you to tell me why your way is better! - Click
Propose file change
at the bottom when done
- Click Create new file to create it
- Enter the correct file name in the box at the top
- Paste the contents of the file you edited locally into the big box in the middle
- Click
Propose new file
at the bottom when done
Once you finish your changes, Github will send me a notification that a pull request has been submitted. I will take a look at it within a day or two and attempt to verify that the changes make sense by:
- Confirming that the file name and the third line of the file match one of the supported locale names
- Viewing each changed string in-game
- Checking Google Translate
- Asking individual human experts
- Requesting help on the KSP forum
If I have any questions about specific changes you've made, I will add them to the pull request, which should trigger a notification to you. Please try to respond to these in as timely a manner as you can manage. Your pull request may be closed without merging if you do not reply for a long time.
Once all the questions and comments are resolved to my satisfaction, your changes will be merged into the main files and included in the next release. I will also add your Github name to the Acknowledgements section of the README file.