Hebrew translation mod

Could be that I might be of help for you. I am writing on a programm called JTranslator. The version that is uploaded currently, won't be of help to you as it won't support hebrew, at least not appropriately. Still, I'm already working on a new version that is meant to support a bunch of languages - hebrew amongst it. The new version is already capable of that.

In my oppinion, it is better to stick to a charset that consists of 256 symbols. Think of charsets like tables saying symbol no. 1 is an 'A' and so on. The key to read hebrew text is, to interpret the text files like iso 8859-1 at first, which is the default charset of civ4. Then convert the letters to their numeric counterpart and interpret these numbers according to a charset that supports hebrew. To write hebrew texts, you would need to do the exact same thing only backwards. To have this simple, it would be the best choice to use a 256-based charset (not even sure if I could support UTF8 and / or 16 this ways). That's AFAIK what the Russians did and it exactly is what the not-yet-released -version of JTranslator does, using ISO 8859-8 (well, I filled up the empty positions with letters from ISO 8859-1 to have it save to convert between charsets - but that should be no problem for you). If you'd prefer, I could build in windows 1255 instead or as second option.

So you would have a tool to write hebrew texts in a way that would keep texts in other languages antouched (you should care about this as if you do it carelessly, you'd could destroy mods text files breaking the mod for users from other countries). Unfortunately, I can't see how I could help you with anything else. I can second things said about the font and the Gamesfont.tga, but I'm not able to help you with that - can't even read hebrew.
 
How did you add that stuff?
As extra language tag? Then there's the problem. If the tags themself (no matter if there's text or not) are not present *everywhere*, then you'll end up with blank text.

I added the Unicode style characters to the English tag " & # 1448 & # 1449 etc....
just without the spaces in between the & and # and the number.
 
Could be that I might be of help for you. I am writing on a programm called JTranslator. The version that is uploaded currently, won't be of help to you as it won't support hebrew, at least not appropriately. Still, I'm already working on a new version that is meant to support a bunch of languages - hebrew amongst it. The new version is already capable of that.

In my oppinion, it is better to stick to a charset that consists of 256 symbols. Think of charsets like tables saying symbol no. 1 is an 'A' and so on. The key to read hebrew text is, to interpret the text files like iso 8859-1 at first, which is the default charset of civ4. Then convert the letters to their numeric counterpart and interpret these numbers according to a charset that supports hebrew. To write hebrew texts, you would need to do the exact same thing only backwards. To have this simple, it would be the best choice to use a 256-based charset (not even sure if I could support UTF8 and / or 16 this ways). That's AFAIK what the Russians did and it exactly is what the not-yet-released -version of JTranslator does, using ISO 8859-8 (well, I filled up the empty positions with letters from ISO 8859-1 to have it save to convert between charsets - but that should be no problem for you). If you'd prefer, I could build in windows 1255 instead or as second option.

So you would have a tool to write hebrew texts in a way that would keep texts in other languages antouched (you should care about this as if you do it carelessly, you'd could destroy mods text files breaking the mod for users from other countries). Unfortunately, I can't see how I could help you with anything else. I can second things said about the font and the Gamesfont.tga, but I'm not able to help you with that - can't even read hebrew.

Hi,
1 - Thanks for the help, I'd love to try your tool
2 - After reading your post I tried the following: changed the font to The Hebrew Multimode Font - which is a font that maps hebrew characters in ASCII range (meaning up to 256 ), then I added texts that use these characters like "àáâãä ÀÁÂÃÄ" , and tried all the different encodings in the file. Nothing worked and I saw this in civ "ÀÁÂÃÄ ÀÁÂÃÄ", which is weird since the font doesn't have these characters...

Any ideas?
 
Well, I can not help you much, sorry. I had to do a little bit with the hungarian translation (didn't write anything for it, but gave some support), but we didn't have to deal with extra-letters (there are a couple of, but Hungarians are used to replace them with similar ones from ISO 8859-1). I had a russification in my hands, too, but don't thing I still have it somewhere. Yet I know that they edited the GameFont.tga and I think that it is an important part of the work. I would alter it (work with a mod for now instead of altering the core files!) so that it uses hebrew letters or anything else you can determine and see if that helps somehow (you should be able to find out which letter has to be placed where by comparing ISO 8859-1 and 8).

I guess that the font is important, too, but I have no clue why your font didn't work. Can you confirm that the font matches ISO 8859-8 or the Windows counterpart? I mean, ASCII is fine, but might not be enough.

Sorry, I think I couldn't help you much, I'll try to find the russification tomorrow. But be sure that they made some mistake: when uninstalling it, the original files are not restored properly. Unfortunately, I can't remember which file was buggy...
 
Well, I can not help you much, sorry. I had to do a little bit with the hungarian translation (didn't write anything for it, but gave some support), but we didn't have to deal with extra-letters (there are a couple of, but Hungarians are used to replace them with similar ones from ISO 8859-1). I had a russification in my hands, too, but don't thing I still have it somewhere. Yet I know that they edited the GameFont.tga and I think that it is an important part of the work. I would alter it (work with a mod for now instead of altering the core files!) so that it uses hebrew letters or anything else you can determine and see if that helps somehow (you should be able to find out which letter has to be placed where by comparing ISO 8859-1 and 8).

I guess that the font is important, too, but I have no clue why your font didn't work. Can you confirm that the font matches ISO 8859-8 or the Windows counterpart? I mean, ASCII is fine, but might not be enough.

Sorry, I think I couldn't help you much, I'll try to find the russification tomorrow. But be sure that they made some mistake: when uninstalling it, the original files are not restored properly. Unfortunately, I can't remember which file was buggy...

If we ignore the billboard issue for now, and focus on the fonts in UI, then all I would need is a working sample of files that add new non latin characters to the UI, the XML file that uses them, the themse files adited accordingly and the relevant font (BTW, I tried to use wingdings but it didn't work - if you have an example that works I could just alter the files - including the actual fonts)
 
I assume you are creating a mod with nothing but the necessary files in it? You should be (although if you were editing the originals it might have worked without the following stuff).

Things you might want to know...

To get a mod to use its own theme files instead of the BtS (or whatever) versions it is probably necessary to edit the mod's Resources\Civ4.thm file and change the "resource_path" and "include" to show the Mod's path. Look at the one that is in the Afterworld mod that comes with BtS to see an example, but the general idea is for the paths given for these two things to specify folders likes "Mods/mymod/Resource" instead of just "Resource" (plus the additional path elements and file name for the second one).

There is also an XML file you should put in the mod and edit:
Assets\XML\Art\CIV4ArtDefines_Misc.xml
In this file, the next to last entry is for the Type called DEFAULT_THEME_NAME. This needs to point to the mod's Civ4.thm file, something like "<Path>Mods/mymod/Resource/Civ4.thm</Path>".

Once that is done, you will need copies of everything in the Themes folder added to the mod, not just any that you change, since it will look for all of them there. Why this is necessary I do not know - other files in the same folder in a mod override the base files in the same location, but apparently not the theme related stuff.

The only mods that come with BtS that use altered themes are Afterworld and Final Frontier (which is why I found out about the above changes), so they both have Resource folders, all the theme files, and the above changes done for them by the makers of the game.
 
I assume you are creating a mod with nothing but the necessary files in it? You should be (although if you were editing the originals it might have worked without the following stuff).

Things you might want to know...

To get a mod to use its own theme files instead of the BtS (or whatever) versions it is probably necessary to edit the mod's Resources\Civ4.thm file and change the "resource_path" and "include" to show the Mod's path. Look at the one that is in the Afterworld mod that comes with BtS to see an example, but the general idea is for the paths given for these two things to specify folders likes "Mods/mymod/Resource" instead of just "Resource" (plus the additional path elements and file name for the second one).

There is also an XML file you should put in the mod and edit:
Assets\XML\Art\CIV4ArtDefines_Misc.xml
In this file, the next to last entry is for the Type called DEFAULT_THEME_NAME. This needs to point to the mod's Civ4.thm file, something like "<Path>Mods/mymod/Resource/Civ4.thm</Path>".

Once that is done, you will need copies of everything in the Themes folder added to the mod, not just any that you change, since it will look for all of them there. Why this is necessary I do not know - other files in the same folder in a mod override the base files in the same location, but apparently not the theme related stuff.

The only mods that come with BtS that use altered themes are Afterworld and Final Frontier (which is why I found out about the above changes), so they both have Resource folders, all the theme files, and the above changes done for them by the makers of the game.

Don't need any safety nets, just changing the default files :) no mods
 
Well, aside from it being a bad idea, the question is which theme file did you change the font setting in? If you are using BtS you need to change them in BtS, not the vanilla Civ4 versions of them. The .ttf font files as shipped are in the vanilla Resource\Fonts, but each version has it's own theme files. Changing the font settings in the vanilla Civ4Theme_Common.thm will only change the fonts in vanilla, not Warlords or BtS...
 
Well, aside from it being a bad idea, the question is which theme file did you change the font setting in? If you are using BtS you need to change them in BtS, not the vanilla Civ4 versions of them. The .ttf font files as shipped are in the vanilla Resource\Fonts, but each version has it's own theme files. Changing the font settings in the vanilla Civ4Theme_Common.thm will only change the fonts in vanilla, not Warlords or BtS...

I changed both (all folders in fact - fonts, themes, xml's ) , but nothing worked.
 
I just looked at the characters you mentioned. Unicode characters 1448 and 1449 are "cantillation marks" (characters in the 1425-1455 range are in this category) - the font my web browser is using for this forum (standard MS arial, possibly the exact same font that game is using if set to use arial.ttf) doesn't have any characters for this even though the "regular" Hebrew characters earlier in this thread were shown. Perhaps they are not in the font(s) you are using either?

So, how about the basic characters from the consonant range? Aleph = character 1488 = &#1488;
 
I might be an idiot, but would running BUG mod cause this behavior?

I don't think so. It does not include any theme files (or the Resource folder at all) when installed as a mod so I would be surprised if it did when installed in Custom Assets.
 
I just looked at the characters you mentioned. Unicode characters 1448 and 1449 are "cantillation marks" (characters in the 1425-1455 range are in this category) - the font my web browser is using for this forum (standard MS arial, possibly the exact same font that game is using if set to use arial.ttf) doesn't have any characters for this even though the "regular" Hebrew characters earlier in this thread were shown. Perhaps they are not in the font(s) you are using either?

So, how about the basic characters from the consonant range? Aleph = character 1488 = &#1488;

Sorry I mistyped.... I used 1488 1489 etc...

Here is another thing, I just reverted all files back to what it was before I started making changes, and then edited the actual ttf files (sylfaen.ttf , arial.ttf etc...) and edited some if the basic laton characters... but I do not see these changes in the main menu UI... or anywhere else in the game. Is it possible that all the UI is not from the ttf's? maybe its all from the TGA files?
 
Unfortunately I was not able to find the russian translation. I remember the guy that gave it to me, said, that he got it from a russian civ4 site. If you know a russian speaking modder, you might ask him to help you. Googled it and found an old thread here on civfanatics that's link were either broken or password protected (WTH?!)... Anyways, that russification would be the key for you. I saw it working so what you try to do is definately possible and your approach is the right way...
 
RFC Europe had russian as the 6th language, but there were a couple issues when trying to have a mod with both latin-1 and russian language sets
Here are the gamefonts, and an example XML
(AFAIK these fonts are the same which were used in the official russification)
 

Attachments

Success!! (well partly)

After a tough battle I realized that windows (7), caches fonts so making changes to ttf files without restarting the system will not show the new characters.
Also seems like Civ uses the system fonts, so those have to be changed .
Anyway, a little google translate and code, and without the billboards, I was able to get most of the UI to work in hebrew.
The biggest problem was the text annotations in civ , this confuses google translate so I had to fix some of these - in fact most of the problems in my version are due to these, but I dont want to invest more on this.

If anyone wants I am attaching the file.

thanks for all the help

EOF
 

Attachments

So you've overwritten french? It would be far cleverer to add an own language entry to keep french (or any other languages) text untouched. Think of a mod that you'd waqnt to translate - you'd destroy it for users of other languages. The hungarization also adds a new entry, so it's possible.

Also, which encoding did you use? If I'd now, I could set up my Jtranslator accordingly to make you translation easier.
 
So you've overwritten french? It would be far cleverer to add an own language entry to keep french (or any other languages) text untouched. Think of a mod that you'd waqnt to translate - you'd destroy it for users of other languages. The hungarization also adds a new entry, so it's possible.

Also, which encoding did you use? If I'd now, I could set up my Jtranslator accordingly to make you translation easier.

I totally didn't mean for this to be an actual mod.
I wanted a quick fix, and I hacked everything to make it work.
I actually changed the sylfaen font and replaced some existing characters (in western script) with hebrew glyphs. And the xml has unicode characters pointing to those characters (which are not actual hebrew charaters), in a mapping I invented.
Also I didn't do the tga files for the bilboards.
I dont expect there to be any actual demand for this so I wouldn't invest in modding it.

I am attaching a newer version here anyway, with a little more bug fixes I noticed while playing.
 

Attachments

Back
Top Bottom