Starting with the current SVN version (so it will be in V30) adding a new translation has become considerably easier.
You can now translate as few texts as you want and it will fall back to using English for all texts that you have not provided a translation for.
For the languages that are choosable in the Civ4 option dialog, use these tags:
English, French, German, Italian, Spanish, Finnish, Hungarian, Polish, Russian, Chinese, Japanese.
You can also add a new language. Choose a fitting tag name (for instance if you want to add Portuguese translations, best use Portuguese as the tag name) and then add your translations using that tag name. To select your new language, open "Caveman2Cosmos\Assets\XML\GlobalDefines.xml". Near the top you will find the new entry LANGUAGE. By setting it to the tag name of your language, you will override the normal language selection and use your new translation instead.
Best start with your translation in the folder "Caveman2Cosmos\Assets\XML\Text". It contains a lot of text files with entries similar to this:
If your language tag is already in there, just replace the text with your translation. If not, then add it after the rest. So if you add portuguese, it might look like this afterwards:
Non ASCII characters need to be represented by their number in the character set, so ö without space results in ö. You can look that up for instance here:
http://ascii.cl/htmlcodes.htm
EDIT: From a fast test, it seems like ä,ö and similar also work so I am not sure why the current translations use the number codes instead.
There are some special codes that refer to arguments that are passed to the text generation. You will usually use them in a similar way as the text that is already in there so I will not go into detail here (best check out the different translation files if you want to learn more). In general %s1 means that a text argument is added while %d1 means a number argument. What kind of info is in that text or number depends on the specific text.
[COLOR_HIGHLIGHT_TEXT]Some Text[COLOR_REVERT] and similar changes the color of the text in between there.
[LINK=literal]A unit or building name or similar[\LINK] will turn that text into a link to the pedia.
In addition to the text files in that folder there are also text files in the different folders below "Caveman2Cosmos\Assets\Modules". They all have CIV4GameText in their name.
You can now translate as few texts as you want and it will fall back to using English for all texts that you have not provided a translation for.
For the languages that are choosable in the Civ4 option dialog, use these tags:
English, French, German, Italian, Spanish, Finnish, Hungarian, Polish, Russian, Chinese, Japanese.
You can also add a new language. Choose a fitting tag name (for instance if you want to add Portuguese translations, best use Portuguese as the tag name) and then add your translations using that tag name. To select your new language, open "Caveman2Cosmos\Assets\XML\GlobalDefines.xml". Near the top you will find the new entry LANGUAGE. By setting it to the tag name of your language, you will override the normal language selection and use your new translation instead.
Best start with your translation in the folder "Caveman2Cosmos\Assets\XML\Text". It contains a lot of text files with entries similar to this:
Code:
<TEXT>
<Tag>TXT_KEY_CORPORATION_BURGERWORLD</Tag>
<English>Burgerworld</English>
<French>MondoBurger</French>
<German>Burgerworld</German>
<Italian>Burgerworld</Italian>
<Spanish>Burgerworld</Spanish>
</TEXT>
If your language tag is already in there, just replace the text with your translation. If not, then add it after the rest. So if you add portuguese, it might look like this afterwards:
Code:
<TEXT>
<Tag>TXT_KEY_CORPORATION_BURGERWORLD</Tag>
<English>Burgerworld</English>
<French>MondoBurger</French>
<German>Burgerworld</German>
<Italian>Burgerworld</Italian>
<Spanish>Burgerworld</Spanish>
<Portuguese>Your translation goes here</Portuguese>
</TEXT>
Non ASCII characters need to be represented by their number in the character set, so ö without space results in ö. You can look that up for instance here:
http://ascii.cl/htmlcodes.htm
EDIT: From a fast test, it seems like ä,ö and similar also work so I am not sure why the current translations use the number codes instead.
There are some special codes that refer to arguments that are passed to the text generation. You will usually use them in a similar way as the text that is already in there so I will not go into detail here (best check out the different translation files if you want to learn more). In general %s1 means that a text argument is added while %d1 means a number argument. What kind of info is in that text or number depends on the specific text.
[COLOR_HIGHLIGHT_TEXT]Some Text[COLOR_REVERT] and similar changes the color of the text in between there.
[LINK=literal]A unit or building name or similar[\LINK] will turn that text into a link to the pedia.
In addition to the text files in that folder there are also text files in the different folders below "Caveman2Cosmos\Assets\Modules". They all have CIV4GameText in their name.