Translations

Heraldic

Chieftain
Joined
Oct 9, 2018
Messages
45
Hello guys!

Very grateful for the precious mod.

I would like to know how to go about creating translations for mod so that you can make it easier to understand information during the game. Could you give me tips on how to proceed about this? What should I know and what files should I edit to achieve this? Thank you!
 
@Dancing Hoskuld and others are better at explaining HOW to go about this - it's actually not that hard, a matter of editing the Assets/XML/Text files (check a few out and they may sorta teach you the basics by observation). I'm curious what language you want to translate?
 
@Dancing Hoskuld and others are better at explaining HOW to go about this - it's actually not that hard, a matter of editing the Assets/XML/Text files (check a few out and they may sorta teach you the basics by observation). I'm curious what language you want to translate?



I would like to translate the mod, if possible, into Portuguese.
 
I would like to translate the mod, if possible, into Portuguese.
Cool... yes it's possible but I'm not sure what exactly needs to be done to start the process.
 
In theory two things need to be done and I am not sure how to do the first.
  1. allow Portuguese to be an option. Once this is done any text that has not been translated yet will get the English version displayed. This allows you to work on text files one at a time.

  2. edit the text files adding in the translations

    If only one person is adding translations to a file at a time then there are no problems. If two or more are trying to do it they need to co-ordinate between themselves or have coordinator combine their work and add it to the SVN.

    All that is needed in the TEXT files is to add a line similar to the others ie
    Code:
    <Portuguese>some translated text </Portuguese>

 
I have a feeling it only needs to be available to be selected in the .ini file. Everything else is covered unless there are very special characters eg cyrilic.
That's what I recall vaguelly as well but I don't know that for sure and lang code is way outside my realm of understanding.
 
In theory two things need to be done and I am not sure how to do the first.
  1. allow Portuguese to be an option. Once this is done any text that has not been translated yet will get the English version displayed. This allows you to work on text files one at a time.

  2. edit the text files adding in the translations

    If only one person is adding translations to a file at a time then there are no problems. If two or more are trying to do it they need to co-ordinate between themselves or have coordinator combine their work and add it to the SVN.

    All that is needed in the TEXT files is to add a line similar to the others ie
    Code:
    <Portuguese>some translated text </Portuguese>


Is there no specific repository where language option files already exist? You may be able to duplicate to create a new one.
 
Is there no specific repository where language option files already exist? You may be able to duplicate to create a new one.
I believe all you need to do is just start using one. If I recall correctly, you can define <Blargnarg> as a language in the text files and if there happens to be some <Blargnarg> language keys defined, <Blarnarg> will become a selectable option in the game. I could be wrong and there may be somewhere where all of the languages must be established. But you could try it and see if it works that way.
 
I believe all you need to do is just start using one. If I recall correctly, you can define <Blargnarg> as a language in the text files and if there happens to be some <Blargnarg> language keys defined, <Blarnarg> will become a selectable option in the game. I could be wrong and there may be somewhere where all of the languages must be established. But you could try it and see if it works that way.
I tried to add just one translation line and get in the game to see what was going on. The game pointed to an error in the line where I added the translation. Despite this I managed to go to the menu, but the new language was not there.
 
I tried to add just one translation line and get in the game to see what was going on. The game pointed to an error in the line where I added the translation. Despite this I managed to go to the menu, but the new language was not there.
@alberts2 : Do you know what this fine gentleman needs to do to start adding Portuguese?
 
Global_CIV4GameText.xml has some text with tags of the form TXT_KEY_LANGUAGE_5. That is the text to be added to the language menu.
But then you also need changes to CvGameText to increase the number of languages (unless you replace an existing one) and then the tag name for the new language needs to be listed in
CvXMLLoadUtility::LoadGlobalText
 
The last language I knew of that was added was Polish so I did a search on that. There are many translations but only one reference in the dll code . Line 803 (in function bool CvXMLLoadUtility::LoadGlobalText() ) in file CvXMLLoadUtilitySetMod.ccp
 
Global_CIV4GameText.xml has some text with tags of the form TXT_KEY_LANGUAGE_5. That is the text to be added to the language menu.
But then you also need changes to CvGameText to increase the number of languages (unless you replace an existing one) and then the tag name for the new language needs to be listed in
CvXMLLoadUtility::LoadGlobalText
The last language I knew of that was added was Polish so I did a search on that. There are many translations but only one reference in the dll code . Line 803 (in function bool CvXMLLoadUtility::LoadGlobalText() ) in file CvXMLLoadUtilitySetMod.ccp
Which way to get to CvGameText and CvXMLLoadUtilitySetMod.ccp ???
 
It's going to take a little coding modder support. You'll get it soon just hold on for a day or two. I won't be able to program any tonight myself so maybe someone else can knock it out for ya.
@KaTiON_PT ?
 
Now I just really need to add the option. But I already started to translate. There are many texts, but I really want to translate all the content. It will take but it will be rewarding hehe
 
The option is there, Main Menu > Options. It's down below.

Untranslated stuff will appear as English.
 
Top Bottom