Languages ???

mikezang said:
Unzip files as below, then put *.tga files to folder
~\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\res\fonts

put *.xml files to folder
~\My Documents\My Games\Sid Meier's Civilization 4\CustomAssets\xml\text

Restart civ4, you will see some Chinese on game screen, but you still use default ttf font file!

You're testing it the wrong way. The reason why you can see those Chinese characters, is because you changed the xml files too. Those description are in Chinese, because your new XML text is so written.

The right way to test, is to start with the original Civ4, and then change only the TTF font. Then you will see that those button tooltips are now using the new TTF font.

I looked in more detail, and I see that the majority of all in-game text, starting from the main menu, to all menu items, to in-game tooltips, all the advisor screens, the civlopedia, the logs, the diplomacy screens and so on, all these use the TTF file. Indeed it would be weird not to.

So where are the TGA bitmapped fonts used? The only place I managed to find, is the city information labels. Here's such a screenshot:

http://home.so-net.net.tw/alrescha/Civ4ScreenShot0202.JPG

What I've done here is to change only the Civ4Theme_Common.thm file as I described previously, to use one of my funny fonts.

You will see that the tooltip description for the "Go-to" button is in the funny font I chose specifically to demonstrate changing fonts. Only the city name "Rostov", the build queue item "Courthouse" and the cultural defense "+40%" are from the TGA fonts.

It is clear that once the in-game text display routines are made truly unicode, localization becomes (almost) straight-forward.

Why then, did they use such old-fashioned bitmapped text display for the city info labels? I wouldn't know. Maybe it is to accommodate the info icons (religion icons and stuff), but this will turn out to be one of the obstacles that'll require a patch to fix, before the city info labels can display non latin alphabets.
 
mnf said:
You're testing it the wrong way. The reason why you can see those Chinese characters, is because you changed the xml files too. Those description are in Chinese, because your new XML text is so written.
If you are right, only use xml I provided, and you should view Chinese in your civ4?

Can You? Maybe I was wrong if you can! Or you are wrong:)
 
No you can't just use your XML files without your TGA fonts, that's because those XML files are so written.

Look at the previously provided screenshot, and tell me, if the game uses TGA fonts for the button tooltips, how did I get it to show the "Go To" help in that font?

I have provided a counter-example to your argument, and showed you evidence that the game uses the TTF in all but the city info labels.

The one possibility that would make both of us right (in some way), is if Civ4 actually employs a custom filter that acts similar to how some DBCS encodes text. But I hate to think this would be the case, there's no clear reason why they would even consider doing that.
 
Mikezang, thanks man, I really appreaciate your efforts.
Actually though, Arabic is a Double Character language, meaning that it involves joint letters, depending on the location of the letter in the word. But this could be solved by coding the characters and I have no problem with that.

Just to clarify now, for changing text like the civilopedia, the menu etc, what do I need to edit? just the XML?

and if I just want to translate the city bar text, 'mnf' buddy, do I also need to edit the city font file.tga? Thank you guys for the help you will provide, I will be giving credits as soon as I get something done ;) ;).
 
I have no idea how to get Arabic to display, in fact, that's also exactly my own problem.

I'm reluctant to use the TGA fonts as I believe that the real problem is actually a small obstacle in the code, and if that can be solved, then all you need is to translate the XML, put in your standard TTF Arabic (or Chinese in my case) fonts and viola, there's your localized version of Civ4.

At the moment, though, the only thing that works, is to go according to what mikezang has provided. Note also that you can't just translate the XMLs to Arabic like you could, when you open them up in an editor. You'd have to convert those Arabic into numerical entities that correspond to your font. (I'm too lazy to go that far.)

On a side note, I believe they call it the symbols font in the Civ4 python scripts.
 
mikezang said:
Well, I can tell you a good news, Japanese version civ4 will be released at June 7th this year, the price will be JPY9,450. I can tell you how to do after I got it.

My God, this is not just good news, it's what I've been waiting for since I heard that Interwise had no plans to bring it into Taiwan. :crazyeye:

Maybe it's time to start the translation work, seeing it's almost certainly doable...my analysis tells me there's about 145,000 words (English) to be translated. (Close to two-thirds are from the Civlopedia.)
 
Okay, I found some python files dealing with encoding in this folder:
...\Firaxis Games\Sid Meier's Civilization 4\Assets\Python\System\email

and then open the 'Encoders' and the 'Charset' python files. Some info about Arabic, Thai, Japanese, Chinese and some others are listed in both files.
Check them out and tell me what you guys think... ;)
 
I believe those under \email are for PitBoss and PBEM email handling. The other .pyc files are just general handling libraries for the different encodings.

On another forum (Chinese) someone said he traced through the string handling scripts and all the python parts are in fact DBCS compatible. He suspects it's something hard-coded into the game engine.
 
What did you both use to show Chinese/Japanese?
I found out that Latin-1 (ISO-8859-1) does not support any characters other than the western ones. How can I change that?
 
Back
Top Bottom