Need a "big bit" of help with the files and the translations

You are viewing a static copy of the old 2DBoy forum, which closed in 2010. It is preserved here for historical interest, but it is not possible to reply to topics. For more recent discussion about World of Goo, visit our new forum.
Need a "big bit" of help with the files and the translationsEV10/28/2008 - 15:11

Guys, I am planning to translate the game into one or two languages (Kyle knows  ;)) and therefore I would like to somehow open and then save properly the text.xml.bin file.

I think that the translation will get working if I add a new "sk" (Slovak) language lines in the .bin file (just like "en" "it" etc) and then change the language in config.txt to "sk" aswell to see it in-game. Correct me, if this is wrong.

But I have problems with the opening and saving - I have seen the "Python apps" or whatever are they called in this forum, but I am not a PC expert, and have never seen such things  ??? A small guide how to use them (or to be more exact: how to properly open/save the .bin file) would be handy. I do not want to modify the game files, just this language file.

PS: Could you confirm me that the game does NOT support most of the following (kinda special) characters (I have seen the font images, but I need some more proof): č š ž ť ď ľ ô á í é ... You know, just to be sure and not use them (it does not make a big difference, the final translation will be understandable in Slovak language with no problems - but normal letters as c s z t will be used instead of those special ones.)

Thanks in advance :)


Last modified Tue, 10/28/2008 - 16:06 by EV
Re: Need a small bit of help with the files and the translationsMarius10/28/2008 - 15:21

Yes, you can just add the sk to the text.xml.bin, and then use the config.txt to use the language.

You can download ltworek's decryptor here (link). With it you can select the file you want to decrypt/encrypt, with a user interface. I haven't tried it myself, so use at your own risk.

I don't know about the support for the special characters. You could just try it, of course. I know the ë is possible.

Re: Need a small bit of help with the files and the translationsEV10/28/2008 - 15:39

That thingy does not seem to be working properly, it gives me a .xml file, but that file cannot be read - it opens a xml page, but says an error there...  :)

Re: Need a small bit of help with the files and the translationsBoudin10/28/2008 - 15:59

For special chars you can see all supported chars in differents png (or corresponding txt) files in the \res\fonts folder of the game.
So they should not work.

It may be possible since the text.xml file is encoded using UTF8 and font files seems to allow adding chars without touching the engine source-code

Re: Need a small bit of help with the files and the translationsEV10/28/2008 - 16:04

Somehow I managed to finally open the text.xml.bin file, but only as a wordpad/notepad document = I am an anti-talent for these operations  :D

Seems like I have an interesting issue lying in front of me...

And please, forget about the special characters, that is the most easiest thing to try once I actually manage to implement them in the file. So far, I have failed.

:-\

Re: Need a "big bit" of help with the files and the translationsMarius10/28/2008 - 16:25

You're supposed to open it with a text editor. All the stuff within brackets and such, is so that the game can understand the file.

So yeah, you're supposed to edit it with the text editor. For example, at the start of the file, you should see something like:

  <!-- Chapter names and descriptions --><br />  <string id="CHAPTER1_NAME"<br />          text="Chapter 1"<br />   es="Cap??tulo 1"<br />   fr="Chapitre 1"<br />   de="Kapitel 1"<br />   it="Capitolo 1"<br />   nl="Hoofdstuk 1"<br />   /><br />

You should edit this so it says

  <!-- Chapter names and descriptions --><br />  <string id="CHAPTER1_NAME"<br />          text="Chapter 1"<br />   es="Cap??tulo 1"<br />   fr="Chapitre 1"<br />   de="Kapitel 1"<br />   it="Capitolo 1"<br />   nl="Hoofdstuk 1"<br />   sk="Slovakian translation for chapter 1"<br />   /><br />

That's basically it. Just try to see the pattern of how the other translations did it, and don't forget to close quote tags and such :P

Re: Need a "big bit" of help with the files and the translationsWishbone10/28/2008 - 17:20

Well, I'm having trouble as well. I'm trying to do a Danish translation. Now, Danish uses the same alphabet as English... Almost... We have 3 extra vowels, but I've checked the fonts (both the .png's and the .txt's) and they are there. But still WoG crashes on startup every time.

I'm thinking it may have something to do with the fact that the translation isn't complete. Meaning that not every <string> tag contains a "dk" attribute. If all string are loaded on startup, that might cause it I guess. Can anyone verify this?

Re: Need a "big bit" of help with the files and the translationsMarius10/28/2008 - 17:23

Wishbone: That shouldn't matter, if it can't find your translation, it defaults to English. You could try this with a fresh version, and just set the language to a character string that doesn't exist in the language file, like <param name="language" value="aa"/>

Did you close all your quote tags? There are XML checkers online, try one, see if it errors. If it does, you messed up the code somewhere.

Other things I can think of are maybe the encoding of the file...

Re: Need a "big bit" of help with the files and the translationsBoudin10/29/2008 - 04:13

Use a more advanced text editor to edit the file (something like PSPad or NotePad++ with the XML tool plugin).

Concerning special chars, there may be some limitations, like a font stored in a fixed or limited size array under the game. I'll try this evening.

Re: Need a "big bit" of help with the files and the translationsWishbone10/29/2008 - 06:52

Well, I used Notepad2 for the editing. I used the XML codes for the three Danish characters, &aelig;, &oslash; and &aring;, and as I mentioned, all three exist in the fonts and are defined in the txt files.

The question is how the game reads the data. I'll check up on the encoding later, and maybe run some more tests. Hopefully, I can figure out what I'm doing wrong.