Easy way to adding new languages

Kabcsi

Warlord
Joined
Oct 23, 2006
Messages
103
Location
Salgótarján, Hungary
I know that here on CFC there are a lot of guys who made translations for the games. Some of them made it by adding a brand new language without any overwriting. But these translations are not compatible with mods. So we have to translate the mods too. Here is a tut on how to add new language easily into mods and of course into the vanilla, wl, bts, too...

The program you need is Altova XMLSpy. Unfortunately it's not free. (So anyone who knows a free alternative, please let me know)

And here is a step by step guide with pictures. Enjoy! ;)

Spoiler :

attachment.php


attachment.php


attachment.php


attachment.php


attachment.php


attachment.php


And of course don't forget to save your file.

Hope it was helpful!
 

Attachments

  • step1.png
    step1.png
    139 KB · Views: 526
  • step2.png
    step2.png
    79.1 KB · Views: 542
  • step3.png
    step3.png
    146.9 KB · Views: 541
  • step4.png
    step4.png
    279.4 KB · Views: 592
  • step5.png
    step5.png
    150.9 KB · Views: 562
  • step6.png
    step6.png
    145.3 KB · Views: 530
I actually started to work on a small translating program some days ago. It's supposed to work the way Kabcsi suggested it in the other thread. At the moment all it can is open an XML and view its content. The loading process seems to be quite sensitive - that means it easily crashes if the XML is a tiny bit strange (haven't checked that in detail, but I believe the problem is caused by characters like á etc.). The GUI is actually finished. Anyways, I thought of handing this program over to you and Kabcsi so you could test it. Once a stable version is available, I would share that program with everyone. Furthermore, I'd like to write the program that ways, that it can be translated to any language (its menues). Usually, modern programming languages support this - if Java does, I'd definately put this feature in. Even if not, the program should support english (to secure anyone can use it), german (as it's not a problem for me to realize that anyways) and hungarian (as it is supposed to support the hungarian community in first place). Also, a short manual in the mentioned languages might be of use. This ways, I could need some help with translating the program and manual to english and hungarian. I thought you and Kabcsi might help me with Hungarian... I'd write something together in english and share that with users thats mother tongue is english to get a perfect translation. I'm taking volunteers :mischief: Note, that if I have more then 2 volunteers, I'll decide for those I know best (from previous cooperations etc.) as I don't want to see the program released before I consider it to be finished and thus I need helpers I trust (so the order you guys are answering on this, is of secondary priority only). If I manage to set up multi language support, I'll do the same with any other language, but this will be after the first version is out only.

So in short: if you are interested in helping me with this, nitram, let me know. Kabcsi already said he'll help, but I guess there is enough work for two. However, till end of february there will be no progress on this. But I could post some screenshots of the GUI.
 
So far, I only maintained translations of mods, haven't really translated any mod nor the main game. But I took a look at the hungarization of the main game and it seems like you 'only' need to translate the content of the Text folder in the Assets/XML directory. Note: even if you only want to translate BtS, you'd still need to translate the texts of Vanilla Civ4 and Warlords as the game still uses them AFAIK. If you only translate mods, you'd need to translate all xmls that contain texts. The location, count, content and name of those files vary from mod to mod - you'd need to figure out that information by your own.
 
If you only translate mods, you'd need to translate all xmls that contain texts.

But it can happen, that the mod still loads text from the main game (for example the text for the main menu), and then you have a problem. Because you also would have to add a translation to the core files (if there's not already one).
 
@The_J: I was assuming that if you translate amod to a certain language, the main game is already translated to that language. Then everything is okay. Otherwise you are right.
 
So far, I only maintained translations of mods, haven't really translated any mod nor the main game. But I took a look at the hungarization of the main game and it seems like you 'only' need to translate the content of the Text folder in the Assets/XML directory. Note: even if you only want to translate BtS, you'd still need to translate the texts of Vanilla Civ4 and Warlords as the game still uses them AFAIK. If you only translate mods, you'd need to translate all xmls that contain texts. The location, count, content and name of those files vary from mod to mod - you'd need to figure out that information by your own.

Okay, thanks :D
 
I'll post a small screenshot of my program (working title JTranslator - the final name will be a bit more dramatic as you can see in the title bar ;) ). Nothing special there. On the left, you see a tree view that lists all text entries under the corresponding pseudo-name. On the right, you see the complete xml viewed. There are also 3 tabs. The first tabs content is the said viewer which I add so the user can be sure he selected the right file. The second tab will allow the user to add a new language. I'm not yet sure what it will do if there are already entries for that language. If possible, it should keep the entries that are already in (so nothing gets overwritten) and add missing ones. If that is too hard to implement, I'll simply check for the existence of at least one such entry and if it is there, the program will then refuse to add that language. You'd then need to open the xml in an editor and by find and replace for example you would have to add empty tags for the desired language. In the third tab, you will be able to view the entry in any language that is available in the xml, and key in the translation in a second textarea. You'll have to select the right entry via the treeview on the left. I found that fits what Kabcsi wanted.

When opening the text file of the Magyar Mod, I recognized that the program crashes due to some invalit characters. Don't know if I'll be able to set up the program more tolerant. Anyways, the default text files of civ4 seemed to load well.
 
I'll try to do that. Á, á, etc. should be no problem as these are part of the UTF-8 encoding standard. But ő, ű and their capital versions could be a problem. Encoding is a problem anyways, I think. Don't know what happens if you try to add cyrillic texts for instance.
 
I'm not quite sure there. It might be this ways for civ4, but cyrillic doesn't seem to be part of UTF-8 and therefor my program will refuse to load it ATM.
 
As I know, cyrillic letters are UTF-8 characters too, I don't know why.
Could be. Then let's say arabic or asian alphabets.

@The_J: Yeah, I made the experience that this can work, but I already had problems with that with hungarian texts. Could be that I played around with the encoding (added a different encoding tag at the beginning of the xml) or something. Can't remember...
 
Back
Top Bottom