Hey there,
As you may know we want to bring Dead Cells to as many people all over the world as we can. The only problem with this is translating the game into multiple different languages is quite a logistical challenge, especially when we're actively developing the game and continuously changing things. Basically it would be extremely expensive to pay a professional translator to update ever change we made, not to mention a waste of time.
So our idea was to let the community help us! We received hundreds of offers from people who wanted to help us translate the game into their own language, so we thought, why not?
so, as promised here is a detailed article on how to help out with the localisation of Dead Cells as well as some tips on making sure you do the least amount of work possible (so you can spend more time playing see)...
How to create a language mod:
Configuration:
YOU MUST BE ON THE BETA BRANCH TO DO THIS AT THE MOMENT.
- First of all create a new folder on your computer. Probably the best bet would be to put it on the root of your hard drive as you'll be using a command line tool later.
- Now navigate to the Dead Cells folder in your steamapps library. You can find it here: :\steam\steamapps\common\Dead Cells\lang. Where drive is the letter of the drive where you install your steam games, C usually.
- Copy the file "settings.json" to the new folder and open it with any text editor (notepad will do).
- This file contains the settings of your mod: - category: "language" - name: the name of the language (in that language) - lang.code: the ISO-639-1 code of the language (e.g. fr, zh, en) with an optional country code (e.g. en-us, fr-ca, zh-cn) - lang.src: the source language (available: en, fr) - lang.chars: the font/chars to use for this language (currently available: latin, simplified chinese, greek, cyrillic)
- Edit the name of the language in the language you are using. So French will be Français, Chinese will be 中文 and so on.
- Edit the code of the language to match the one that you will be translating to, for example: (e.g. en, fr, zh). You can use an optional country code (e.g. en-us, fr-ca, zh-cn) if you'd like to specify which variation of a language you're translating to, for example: pt-pt and pt-br are quite different.
- If your language uses a specific character set, i.e. non latin characters, then change that too. At the moment you can pick from: - latin, - simplified chinese - cyrillic - greek The names must be written exactly as above.
- If you are more comfortable translating from French than English, then change the "src" to "fr"
- Save the file.
Create a ".po" file from scratch:
- We use Gettext for our localisation which means you must use Poedit to manage your translations. Head over to www.poedit.net and download the FREE version of the program.
- Open Poedit and select "File" -> "New from PO/POT file" Then navigate to :\steam\steamapps\common\Dead Cells\lang and select the "main-en.pot" or "main-fr.pot" file depending on which language you prefer to translate from, but don't forget to change the settings file accordingly as per the configuration step.
- Now save this file as "main.po" in the directory you created earlier.
Translate:
Now you may begin translation in your new "main.po" file.
The only real thing that you need to know is about the variables that you will come across. Variables are denoted by :: :: Anything within the double colons is a variable. So for example ::var:: is a variable and should not be translated. You may however more the variable in the sentence.
For example:
"The big house has ::var:: windows."
can be
"There are ::var:: windows in the big house."
You will most commonly come across variable like ::+power:: or ::duration:: followed by a /s or something along those lines. This is simply a "per second" shortcut in english and you may adapt it as you need to your specific language.
Test:
You can test your mod locally on your machine without having to upload it to the internet each time. To do this:
- Open a command line.
- Navigate to the Dead Cells folder here: :\steam\steamapps\common\Dead Cells
- type deadcells.exe --workshop-test (where is the location of the folder you created previously. for example mine is E:\workspace\mods)
- Steam will open a dialogue box at this point. BE CAREFUL it won't necessarily pop up, you may have to click on steam in your system try to get it to appear.
- Press ok, steam will then install your translations files into the game and ask you to either tick a box to launch the game automatically, or press 'play game' once it has finished.
- Note you can also do this by right clicking on Dead Cells in your steam library, selecting properties, set launch option, then inputting --workspace-test . This will then automatically launch the test version of your game each time you open dead cells through the steam application.
Upload:
To upload your new language mod to steam workshop and put it online you need to use the command line tool again.
- Open the command line.
- Navigate to the dead cells folder here: :\steam\steamapps\common\Dead Cells
- Type: deadcells.exe --workshop
- Click on ok on the steam popup (and remember it might be hiding behind another window).
- This will then open another command line window like this:
- Choose create a new workshop item by typing 'n' and inputting the path to your mod (which is the folder you created earlier):
- This step will prompt you if there are errors with the variables in your translation or with missing lines of the translation. If there are, go back and fix them, then repeat the steps above. This is why it's important to pay attention to the ::var:: items and type them exactly as they appear in the original text.
- Once satisfied with your changes, type yes and then confirm the language code that you are using. If it is not the correct code, open the settings.json file and change it to the correct one, then repeat the above steps.
- This will upload the file to your steam workshop and allow you to edit the workshop irtem through the steam interface.
Managing your mod:
You can add a thumbnail to your mod by following this guide for the moment. We will add this functionality to our tool natively very soon.
