Wonder Boy: The Dragon's Trap

Wonder Boy: The Dragon's Trap

Not enough ratings
Translating Wonder Boy: Dragon's Trap
By Alex Khayrullin
This guide will give you all the information you need to add a new translation to Wonder Boy: The Dragon's Trap or add an existing one to the game.
 
Rate  
Favorite
Favorited
Unfavorite
Why?
There might be several reasons why someone would want to add a new translation to the game.

  • Do you know someone who you want to share the game with, but who doesn’t speak neither of the officially supported languages?
  • Do you want to create a gag translation, like Pig Latin or Pirate?
  • Do you want a new set of dialogues to complement another mod?
  • ...why not?
The basics
The game’s dialogues are stored in a CSV file. Here’s how you can find it: right-click on the game in your Steam library, select “Properties”, switch to the “Local files” tab and click on “Browse local files”.



A file explorer will be displayed.



Go to the bin_pc\strings subdirectory and you’ll find a main.csv file. This is the one you’re looking for. Open it using an editor of your choice (select “Comma” as a separator if you’re using a spreadsheet like Microsoft Excel or LibreOffice Calc) .



Let’s focus on the third column first. This column contains translation keys, which are in essence identifiers for strings. For instance, when the game wants to display the first text of the intro, it finds the line with the translation key “intro_text_01” and works from there.

Columns starting with the fifth are obviously translated strings. You might notice that only the English translation is fully complete and that’s not a mistake: as you will see while working on your own translation, when the game doesn’t find a translated string for a particular key, it uses its English version instead.

You will also notice that some strings contain placeholders such as “%(NUMBER)”. These need to be kept in your translations of these strings. Other strings contain tags like “[ b ]” (without the spaces) that only serve to change the color of one or several words, you don’t absolutely have to keep them, but it would be really nice if you did.

Take some time to browse through the file to see whether you can put each string in its context. Once you’re done, and not discouraged by the amount of work to be done, proceed to the next step.
Creating your own translation
Now that you know the basics, you can start working on your own translation. It will basically consist in creating a new file with a similar structure that the game will load in addition to the main file seen above.

In order for the file to be taken into account, its name should start with “mod”. For instance, “mod_russian.csv”.



This file must also use commas as separators and include the following columns:
  • Columns 1 and 2 : empty
  • Column 3 : translation keys (you can just copy the ones from the main file)
  • Column 4 : empty
  • Column 5 : your translation

Here’s an example:


And starting from this point, you will be able to use the new language in the game:


Most of the strings can be easily tested while playing the game normally, except for some of the Pig Mens’ and Nurses’ quotes: while they have pools of quotes that depend on the form you’re currently assuming, a quote is chosen from the appropriate pool at random, and it is possible to not see all of them during normal gameplay.

To remedy that, you’ll need to enable the in-game localization testing tool. To do so, open the file bin_pc\config\Settings.cfg and change the following values:
  • “Editor” (under the “Main Modes” heading) : set to “true”
  • “ShowGameNoTools” (under the “Tools/Windows” heading) : set to “false”

Run the game, and it will now have a toolbar, with the game itself confined to an internal window.


Enter a shop, a hospital or the church. Then, in the toolbar, click on “Windows” and select “Localization” (under the “QA/Localization” heading”)

On this window, you can click on “Debug: Shop Description” to put any string in place of a sellable product’s name:


Or click “Debug: Shop Bubble” if you want to see how the text works as a piece of dialogue:


And now you’re good to go. Once you’ve finished your translation, you can share your mod*.csv file for everyone else to use!

Here’s some additional advice:
  • As you might have seen while browsing the main file, some strings are rarely or never translated in other languages than English, such as the copyright notice, most of the end credits, as well as strings exclusive to the demo and the retro mode. You can safely delete their translation keys from your file.
  • Watch out for new updates, it often happens that an update adds new strings to the main file, in which case your translation will be in need of an update as well.
  • You might have noticed that some lines in the game are punny or intentionally silly, such as Pig Mens’ and Nurses’ quotes or some item descriptions. Don’t be afraid to be funny or silly while translating these strings, it will only improve your translation.
  • Keep in mind that the player character can be a boy or a girl: unless a line of narration or dialogue comes in two distinct varieties based on the chosen character, keep it gender neutral, and if that requires rewording the line, so be it.
Importing a new translation
If you want to use a custom translation made by someone else, do the following: right-click on the game in your Steam library, select “Properties”, switch to the “Local files” tab and click on “Browse local files”.



A file explorer will be displayed.

Go to the bin_pc\strings subdirectory and copy your new file there. Run the game and the new file should be taken into account automatically.

< >
4 Comments
Carlos Jun 3 @ 8:03pm 
There is no mention: the game must switch to "beta_save_to_appdata" branch to read your translation files. And thank you for the documentation guide.
_Spitz Mar 11 @ 1:45pm 
Thanks! I'll do that right away.
Alex Khayrullin  [author] Mar 5 @ 12:11pm 
I didn't contact the devs about making my translation official. They contacted me :) .
I had created a thread in the "Hacking / Modding" thread about my translation, and it all went down from there.

So if your translation is complete, why don't you create a thread in that subforum and see what happens :) ? Maybe other Swedish-speaking players have comments, criticisms or suggestions, that's always something you can use.

Glad to see my guide helped :) !!!
_Spitz Mar 4 @ 1:46pm 
Using your guide, I've managed to create a Swedish translation. Thanks a lot! :D
What email address did you use to contact the devs about your translation?