How to translate

And who knows how to set the number of languages to more than 5? I have changed Russian to Dutch now (no offense to Russian players, it came first of the three not-used languages), but it won't show Russian at the list. Does anybody know wether it is possible to set the number of languages from five to six?
 
Laucian said:
And who knows how to set the number of languages to more than 5? I have changed Russian to Dutch now (no offense to Russian players, it came first of the three not-used languages), but it won't show Russian at the list. Does anybody know wether it is possible to set the number of languages from five to six?

Yes you can. Edit that cvOptionsScreen.py in Assets/python/Screens/ directory and find entries where reads ENGLISH and so on. Add your language line (eg DUTCH) in this file and add your language lines in XML-files (in same order you wrote in py-file).

cvOptionsScreen.py:
aszDropdownElements = aszDropdownElements + (localText.getText("TXT_KEY_ENGLISH", ()),)
aszDropdownElements = aszDropdownElements + (localText.getText("TXT_KEY_SOMEOTHER", ()),)
aszDropdownElements = aszDropdownElements + (localText.getText("TXT_KEY_DUTCH", ()),)

Some XML-file:
<TEXT>
<Tag>AI_DIPLO_DECLARE_WAR_1</Tag>
<English>This world isn't big enough for the two of us! ([OUR_NAME] declares war!)</English>
<Someother>Some other language text! ([OUR_NAME] declares war!)</Someother>
<Dutch>Dutch dutch ([OUR_NAME] dutches dutch!)</Dutch>
</TEXT>

I have emailed all needed and prepared files to anjf so contact him.
 
I just can't see where are these lines. I open CvOptionsScreen and I only see this:

# Languages Dropdown
tab.attachLabel("LangHBox", "LangLabel", localText.getText("TXT_KEY_OPTIONS_SCREEN_LANGUAGE", ())) # Label
szDropdownDesc = "LanguagesDropdownBox"

tab.attachSpacer("LangHBox")

aszDropdownElements = ()
for i in range(CvGameText().getNumLanguages()):
szKey = "TXT_KEY_LANGUAGE_%d" % i
aszDropdownElements = aszDropdownElements + (localText.getText(szKey, ()),)

szCallbackFunction = "handleLanguagesDropdownBoxInput"
szWidgetName = "LanguagesDropdownBox"
iInitialSelection = CyGame().getCurrentLanguage()
tab.attachDropDown("LangHBox", szWidgetName, szDropdownDesc, aszDropdownElements, self.callbackIFace, szCallbackFunction, szWidgetName, iInitialSelection)
tab.setLayoutFlag(szWidgetName, "LAYOUT_LEFT")

Do I have to add these lines here?
 
I just can't see where are these lines. I open CvOptionsScreen and I only see this:

-snap-

Do I have to add these lines here?

It seems they have changed it. Because there is now this line "for i in range(CvGameText().getNumLanguages())" ie. "for every language do following", you don't have to change anything. It should work directly if you add <yourlanguage>text</yourlanguage> lines to every text file, I think.
 
I've added the description of the palace in the civilopedia and it just doesn't works. Does this means that I should change the whole xml file if I want to see wether it works? FIRAXIANS!!! YOU WANTED TO HELP TRANSLATORS BUT YOU HAVE DONE IT HARDER!!!!

By the way, I want to say that me and two friends of mine are preparing a CATALAN translation of the version 1.61. We are studying translation (and this means that we will TRANSLATE the civilopedia too, and not copy&paste from the wikipedia) and I personally want to become a localiser (still learning), this means that we will also dub the audio files (we are only three catalans studying in Germany and we just have horsehockey laptops and even shittier microphones, so don't wait for a professional dubbing). So...

FULLY TRANSLATED CATALAN VERSION COMING SOON

PS: Will this also work for Warlords and BTS?
 
I've added the description of the palace in the civilopedia and it just doesn't works. Does this means that I should change the whole xml file if I want to see wether it works? FIRAXIANS!!! YOU WANTED TO HELP TRANSLATORS BUT YOU HAVE DONE IT HARDER!!!!

You can do it in easy way: change all <English> (or if you are translating from it, change <German> or <French>) to <Catalan> (and </language> to </Catalan>) in every file.

PS: Will this also work for Warlords and BTS?

Yes, but of course there are more lines to translate in them. And you have to copy also all Civ4's text files to Warlord's (BTS's) own customassets (or catalan mod -) folder to have those texts in Catalan.

PS. Tutorial texts are not in assets/xml/text/ but in mods/tutorial/. CIV4QuestText.xml is the right file.
 
You can do it in easy way: change all <English> (or if you are translating from it, change <German> or <French>) to <Catalan> (and </language> to </Catalan>) in every file.

I did this: I added a tag <Catalan></Catalan> and I wrote there the translation, but it didn't work. What I asked was if I got to add a <catalan> tag to the whole document in order to be able to see this on the game. I don't want to remove any of the languages there, I just want to add catalan.

Kahkonen said:
Yes, but of course there are more lines to translate in them. And you have to copy also all Civ4's text files to Warlord's (BTS's) own customassets (or catalan mod -) folder to have those texts in Catalan.

PS. Tutorial texts are not in assets/xml/text/ but in mods/tutorial/. CIV4QuestText.xml is the right file.

Understood! There's lots of work to do with the translation for the version 1.61, so I will work only on this.

PS. Thanks for your help anyway!
 
I did this: I added a tag <Catalan></Catalan> and I wrote there the translation, but it didn't work. What I asked was if I got to add a <catalan> tag to the whole document in order to be able to see this on the game.

I think, yes. You have to have <Catalan> tags in every files.

You don't have to add them, if you do how I described in my last message. Change all "<English>" to "<Catalan>" (and "</English>" to "</Catalan>") in every file. Then you should have Catalan in languages. Texts are in English first, of course.
 
Doing this I'll remove all the english texts and that's what I don't want to do! Wait... Wait a minute... Do you mean copy all these tags without removing the original tag?
 
So, I remove all these <Italian></Italian> (I never run civilization in italian, so I'll delete it) and instead I add the <Catalan></Catalan> tags, right? And how could I make appear at CvOptionsScreen the option "Catalan" as "Catalan" and not as "Italian"? I just can't undertand this new procedure.
 
So, I remove all these <Italian></Italian> (I never run civilization in italian, so I'll delete it) and instead I add the <Catalan></Catalan> tags, right? And how could I make appear at CvOptionsScreen the option "Catalan" as "Catalan" and not as "Italian"? I just can't undertand this new procedure.

In my translation there are only <English></English> and <Finnish></Finnish> tags. I mean that you can simply write Catalan translations to eg. English, or if you translate from English, to eg. German tags.

This way:

<English>Thank you</English>
<German>Danke</German>

-> change all <German> to <Catalan>
<English>Thank you</English>
<Catalan>Danke</Catalan>

-> then translate
<English>Thank you</English>
<Catalan>Gràcies</Catalan>

(Of course you can also add Catalan tags so that you will have:
<English>Thank you</English>
<German>Danke</German>
<Catalan>Gràcies</Catalan>

But I liked more to have only English and Finnish in text files - does not take so much bytes.)

HEY! Now I remembered! :-D

In CIV4GameText_Misc1.xml you have these lines:
<Tag>TXT_KEY_LANGUAGE_0</Tag>
<Tag>TXT_KEY_LANGUAGE_1</Tag>
and so on.

You have to add
<TEXT>
<Tag>TXT_KEY_LANGUAGE_*</Tag>
<english>Catalan</english>
...
...
<Catalan>Català</Catalan>
</TEXT>
* = ordinal number of your language (if you replace German tags, it will be 2)
 
Now I understand!!!!

I have currently five languages, so catalan should be the number 6, right?

Today I'll try to add this line to CIVGameText_Misc1.xml and a line <Catalan>q</Catalan> to the xml files only to see if it really works and I can see that q while playing. Tomorrow or maybe Saurday I'll tell.

PS: Glad to see you writing in perfect catalan Gràcies and Català ;)
 
I have currently five languages, so catalan should be the number 6, right?

Yes. But the new tag should be <Tag>TXT_KEY_LANGUAGE_5</Tag>, because they start from 0: English is 0, French 1, German 2, Italian 3, Spanish 4 and so Catalan should be 5.
 
The tutorial drives me crazy. Should I create a mod for the catalan translation and another for the translated tutrorial?
 
The tutorial drives me crazy. Should I create a mod for the catalan translation and another for the translated tutrorial?

Yes. You have to put other Catalan translation files into CustomAssets folder and tutorial (CIV4QuestText.xml) to Mods\Tutorial\Assets\XML\Text\. (I have not tested if it works in CustomMods folder.)
 
Well, I just want to show you the work done in 2007. I've already translated 4 files. These are DiplomacyText, GameText_Help, GameText_Misc1 and GameTextInfos. I can already see the main menu in catalan

mainmenuwa1.png


How does it look like? Great, isn't it?

PS: Be patients, catalans, in march or april it will be ready!

PS2: Happy new year!
 
Back
Top Bottom