Translations
Staxel has been built to handle having multiple translations. It includes the ability to change all text being displayed with only a couple of exceptions to this rule. The following is a list of features you can change:
- Dialogue text. (i.e. Villager conversations)
- Menu text. (i.e. All menu's. Item/Block names and descriptions. In world Tags. etc)
- The font used. Japanese translation uses this to provide a better default font for Japanese characters.
- Other various instances of text.
With that however, there are a couple things Staxel cannot do. These include;
- Can not set a font for only a specific set of characters.
- Can not handle right to left text.
- Does not support gendering names or items. In most cases you must either assume neutral gendering, such as the for the player, or needed to be written into the preceding text. The latter should be used in cases where an item will not change, such as the Mug'o'sap in the Barkeep's dialogue.
Contents
Editing the Official Staxel Translations
The Staxel team has chosen to have all translations publicly available for review and editing over at https://github.com/bartwe/StaxelTranslations. Even if you have knowledge with Git and/or Github, you may still want to see the short tutorials, #How to Check Translations Ingame and #Viewing Dialogue Flow.
Editing Files on Github
First of all, head over to https://github.com/bartwe/StaxelTranslations. You will be greeted by a page that looks like;
Don't be alarmed by the large amount of information located on this page. The majority of it is not needed for beginner users. The main thing is getting to the language you want to edit. You will see a bunch of lines that start with an icon which looks like a folder. After each of these icons, is a four character name with a dash in the middle. This is known as a Language Code. In the simplest form, the first two letters signify the language. For example, "en" is English, "fr" is French and "ja" is Japanese. The second set of characters refers to the region of which the language resides. For example, "GB" is Great Britain English, which has differences to "US" which is American English. With that knowledge, click on the folder with the language you want. (If your language is not listed here, then you will need to create it. This will not be handled in this tutorial.)
You will be greeted with another page. This page contains also contains a whole bunch of files, each of which represent a section of text you could change. Most files are used to replace NPC dialogue, though there are some files at the bottom of the page which are used to replace other sections of text, such as item descriptions. Click on the file you want to change. Once you have selected the file you to edit, there will be a edit button (Highlighted by red in the image below.) that you will need to press.
Doing so will move you to a page that will look like;
You can safely ignore the message that appears up at the top. This is saying that Github has made a copy of the files for you to edit without affecting the original.
The middle of the page is now a text editor. From this point forward, you can edit the translations though there may be a bit of confusion on what to edit. The following will describe what you can see in many files.
At the start of the file, there two lines which are similar to the name of the folder you entered before. This is used by the game to work out which translation this belongs to. In most cases, you will not be changing these lines.
language.code=ja-JP language=日本語
Below is the first type of translation you may see. These lines are for translations that were done. These should not need to be edited, however a double check cannot hurt as incorrect translations can happen.
//[Reference] 'Achievement unlocked: {0-achievement}!' achievements.achievementUnlocked=アチーブメントがアンロックされました:{0-achievement}!
The first line is what is known as a "comment" which is signalled by the "//" at the start of the line. Essentially this line does nothing in game, but is there tell you what the English line was.
The second line is the actual translation for the line. The first part, in this case achievements.achievementUnlocked=
is the name of the line being translated, and the part after the "=" is the translation. If you edit this, there should be no gap between the "=" and the actual translation.
Below is the second type of translation you may see. This is for all untranslated lines.
//TODO Translate [Reference] 'Why am I not watching over the tavern you ask?' staxel.village.dialogue.job.BarkeepWorkPlaceMissing.line:10000100=
The first line is a comment. This time it contains "TODO Translate", signifying that this line needs to be done. If you wanted to translate this line, add the translation after the "=" symbol, with no space between the equals and the translation. Once it is done, remove the "TODO Translate" leaving it like //[Reference] 'Why am I not watching over the tavern you ask?'
And finally, below is the third type of translation you may see. This is for when the English line has been changed, but the translation has not been updated to reflect it.
//[Validate] Delete this comment if or when the translation is accurate. //[Reference] 'It's this way!' staxel.village.dialogue.Tutorial.line:10003600=Par là !
This line needs to be double checked to see if the translation still lines up with what is being asked for. If you do edit this, or confirm it is correct, remove the entire line containing //Validate
.
With that, you should know what each line does. However there is one extra thing that may confuse you. If we go back to the first set of lines;
//[Reference] 'Achievement unlocked: {0-achievement}!' achievements.achievementUnlocked=アチーブメントがアンロックされました:{0-achievement}!
You'll notice the text {0-achievement}
. This is known as a "Variable". This is a value that will add in some other text to the statement, turning the sentence into "Achievement Unlocked: Locked and Loaded!" for example. This variable has two parts. The first part is the number, which contains what we want, and second, including the dash, is the description of the number. These variables should be included, unchanged, in the translation. The location of this variable should make sense grammatically and can be moved to a different section of the sentence. There is no need to worry about changing the variable description, as these passages are often translated elsewhere and therefore will not appear to the user.
With that you should have enough knowledge to edit these files.
Once you have finished editing the file, scroll down to the bottom of the page. There will be a section that looks like;
In the first box, you should put something like "Updated [Filename]'s [Language Name] Translation" such as "Updated Tiles.lang English Translation". This names what you have changed, which is known as a "commit". The second box is where you add more details but this isn't necessary.
Once you have edited the first box, click "Propose file change". You'll be brought to a page similar to below;
This page essentially shows you what you have changed, and you can look over it if you want to make sure what you have done. From this point you have two decision;
- Finish now and submit everything.
- Or Continue on with another file.
Continuing editing
You'll need to head back to your version of the files first. The quickest way I found to get back would be to;
- Click on the 6 letter text, to the very right of your username on the page. it should be the 7 letter and number gibberish. [Media:Getting To User Fork 1.png Located here.]
- Click on the "StaxelTranslations" at the top of the page next to your username. [Media:User Fork Github.png Located here.]
At this point you are on your local files. But you aren't on your changes just yet. Click the dropdown that says master, and go click "Patch 1". Now you are on your own changes.
From this point you can navigate to the file you want to change again, and use the knowledge above to edit it.
Submit your changes
Your changes haven't been submitted to us just yet, you will need to make what is known as a "Pull Request" to get this changes made. Firstly head to https://github.com/bartwe/StaxelTranslations/compare. After you have done that follow these steps;
- Click on "compare across forks." Two more boxes should appear.
- Click on the third box from the left and select the second option. This should be "YouGitHubUsername/StaxelTranslations".
- Click on the fourth box from the left and select "Patch 1".
- Click on "Create Pull Request". This will create a new set of boxes where you clicked. This will take the name of the commit you did earlier, and also it's description. If you are happy with these just click on "Create pull request" once again.
You will then go to a page that looks similar to;
At this point you are almost done. Once you see this page, please wait about 1 to 2 minutes and refresh the page. At this point a bot should have messaged that you need to sign a waver in order for your changes to be accept. Follow through with it's instructions.
When you have signed the waver, you are done. However in order to speed along the translations acceptance, it would be recommended to head to our Discord at https://discordapp.com/invite/Staxel and drop a message in #translations in order to say that you have done this.
How to Check Translations Ingame
Checking your translations Ingame can be fairly easy to do.
The first thing you need to do, is to head to /PathToStaxel/gamedata/content/staxel/StaxelTranslations/
. This will lead you to the similar place as the https://github.com/bartwe/StaxelTranslations.
That is all, just edit the files here are you are ready to go. After changing files, make sure Staxel is closed and then run Content Builder. You can do this by going to /PathToStaxel/gamedata/bin/
and running "ContentBuilder.exe". When it is running, click on "Validate" and let it do its thing. After it is done, you can load Staxel again to see your changes.
Viewing Dialogue Flow
You might have noticed at this point, that Staxel dialogue lines are not in any proper order. This is because these files are automatically generated. This guide will focus on how to view these files.
The first step would be to download a program known as Yarn editor. The download for this is located at: http://infiniteammo.com/Yarn/Yarn-2016-08-15-win.zip
Once the zip is downloaded, extract the files and run Yarn.exe. Then click on File -> Open and then head to /PathToStaxel/gamedata/content/staxel/villager/personality/dialogue/
and open the json file of choice.
Using this application, you can see which line of text will be triggered in which location and therefore be able to tell how the text flows between connections.
Creating your own language file
This section will detail how you will create your own translation files. This is mostly needed in order to make sure your Tiles, Items and other various things will get translations instead of the default choice the game will make.
[Coming Soon]