So, you want to help us localize/translate Defender’s Quest. Let’s get to it!
FYI, we are looking for a combination of professional and fan (volunteer) translators. We have a limited budget for professional translations, but we’d like to keep people’s names on file in case something comes up. We’re starting with German, and if that goes well we’ll proceed to Spanish and possibly others. For personal reasons I’d also like to do a good Norwegian translation as that’s my native language, but I might have to foot the bill for that one personally (NOTE: The german translation position has been filled).
[list=1]
:szw72mjx]You need access to the latest test build of the game. PM me asking for a testing invite if you don’t have one already./szw72mjx]
:szw72mjx]Download and install the latest test build/szw72mjx]
:szw72mjx]Find the “locales” folder in the game’s installation directory (might be in a “bin” directory depending on the package type)/szw72mjx][/list:o:szw72mjx]
Once you’re in this folder, this shows you all the locales (language packs) that the game supports. Right now you’ll see a few things:
_flags (folder)
en-US (folder)
de-DE (folder)
index.xml
Open index.xml in a text editor, you’ll see something like this:
<locale id="en-US" default="true" sort="0"> <!--American English-->
<ui language="Language" region="Region" accept="Okay" />
<label id="en-US,en-GB,en-CA" language="English" region="United States"/>
<label id="es-ES" language="Inglés" region="Estados Unidos"/>
<label id="de-DE" language="Englisch" region="Vereinigte Staaten"/>
<label id="fr-FR" language="Anglais" region="États-Unis"/>
<label id="nb-NO" language="Engelsk" region="U.S.A."/>
</locale>
The index.xml controls what languages the user can select from the languages menu in the save slot screen. This is the entry for American English, or “en-US”
“en-US” is American English’s locale id. The locale id is the http://en.wikipedia.org/wiki/ISO_639-1 with 2-letter country suffix.
This includes the name of that language in region in its native language as well as other supported languages. You can just put placeholders in and you only need to define stuff for languages you plan on supporting. Right now only en-US and de-DE (German in Germany) are supported, so if you were to add, say, Polish, you would add an entry for “pl-PL” (is that right?). The tag has the words for the interface elements on the locale menu in the specified language.
You might also want to add a flag for your country. Those are stored in the “_flags” folder and are 16x11 png files. I got mine from http://www.famfamfam.com/lab/icons/flags/. Just make your flag’s name match the locale id and it will automatically select it for your locale.
Each locale is a combination of a language (“English”) with a region (“United States”). This is because there are often regional variants of languages and often cross country borders. For instance, there’s German as spoken in Germany (de-DE) and German as spoken in Austria (de-AT). There’s also Canadian English, Costa Rican Spanish, etc, etc.
Anyways, that just defines what languages are available. You then have to supply actual text. The simplest way to get started is to just copy the en-US folder and rename it to your country code, then open the contents and start replacing text. That way, you’ll have something that works right away, but can slowly work through it and see your changes in game.
So, open up en-US and take a look. You’ll see a lot of files. Generally, these are all CSV files, which are spreadsheets formatted as plain text. Generally, a row of cells is written like this:
“Text that fits between”,“two quotation marks and”,“separated by single commas”,
Note that these are normal quotation marks, not fancy left/right variants, and regular commas. Every line MUST end with a comma or the game will choke. Furthermore, in some files I use 4 commas as a separator as a brute-force hack. That might change. Just follow whatever format you see in the given file and you SHOULD be fine. Do not add extraneous punctuation, extra lines, or break the pattern or you risk the file not working. Also, use a plain text editor like Notepad++, do NOT use a word processor like Microsoft Word.
Anyways, I imagine we’ll have lots of fun dealing with encoding issues and CSV stuff as time goes on. This is kind of wild territory we’re in and we’ll figure it out as we go - for now this looks pretty stable though.
So, let’s look at data_status_effects.csv:
"$FLAV_SLOW","Slow",
"$FLAV_FREEZE","Freeze",
"$FLAV_LIGHT","Light",
This defines the names of the flavors “slow”, “freeze”, and “light”. So, in data files where you’re putting the names of flavors, these flavors are now just ids - the game will attach “$FLAV_” to the front of a flavor id and then try to look up that value in the locale database to display the name. So, you might do this for
Norwegian:
"$FLAV_SLOW","Sakte",
"$FLAV_FREEZE","Frys",
"$FLAV_LIGHT","Lys",
And save the file. Keep in mind, if you use a spreadsheet program to edit these files, they might trash the formatting and it will have to be put back in manually. That’s not TOO big of a deal - I can be on hand to give tips for fixing them after the fact, but in general if the formatting breaks, the game will choke, guaranteed. It might even choke if they’re perfectly formatted! I’ll be here to bail you out, either way.
So, basically all a translator has to do is make their own localization folder, enable it in the localization index file, replace english strings in their copied folder, and then reload the game. You can select your new locale from the save slot menu, and if nothing goes wrong, you’ll see your new text!
Caveats:
[list]
:szw72mjx]Encoding Save your text files as UTF-8. If you don’t know what this is, just save your files normally and if they choke, talk to me and we’ll fix it
/szw72mjx]
:szw72mjx]Font support will take some time. The latest version of the game uses an extended Latin character set, so I know it will pick up ümläüts and Nørwegiån characters, etc, but I’m not so sure about those little cross-lines on Polish characters, for instance. Also, asian, arabic and cyrillic characters DEFINITELY won’t work, I’ll have to do some major overhauling to support that, which means there’d have to be either proven interest in Asian markets, or a lot of demand from asian/arabic fans, for us to consider it. Cyrillic is not as big a deal and we’ll add that soon because it’s only a few extra dozen characters and otherwise behaves mostly like latin text (ie, left to right, similar word lengths, etc).
So, if you do a translation and some characters aren’t showing up, post a list of them on this forum and I’ll add them in the next build if I can.
/szw72mjx]
:szw72mjx]Legal issues have to be worked out. Nothing’s stopping you from doing your translation, of course, but I need to talk to my lawyer to find out if and how we can include them in the game. I also want to modify the EULA to explicitly give you the permissions you need to translate the text and share it with your friends because technically those rights might still be reserved by us. We’ll do a similar thing with regards to mods. So, eventually I’ll post some fancy legalese that basically says if you make a translation and want us to include it in the official game, you’ll have to sign over some rights to us (probably some kind of Creative Commons license) and let us use it freely.
/szw72mjx]
:szw72mjx]Grammar, word order, word length, varies wildly between languages. More than likely, a translation you’re working on might not fit in the space allotted. There’s two solutions: 1) get me to make the game more flexibile, and 2) get creative, perhaps by thinking of a shorter synonym. I’ll try to help where I can, but often you’ll have to resort to 2). In reasonably situations, I’ll try to add support to the game in places I anticipate this will happen - such as cutscenes. There’s already support for making cutscene lines show only if a certain locale is active, so if one line in English becomes enough for two in German, you can add a second line for the German one in this way and still have the cutscene play smoothly. Again, talk to me and we’ll work it out.
/szw72mjx]
:szw72mjx]Full documentation is forthcoming. This is just to get you started. There’s a lot of tips/tricks and tools available to you that I don’t have time to cover just yet, but I will get to them all eventually. /szw72mjx][/list:u:szw72mjx]