1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

[HowTo] Play the Game in a different language with CBP and CP

Discussion in 'Community Patch Project' started by Estebanium, Dec 1, 2014.

  1. Estebanium

    Estebanium Prince

    Joined:
    Oct 16, 2014
    Messages:
    483
    Gender:
    Male
    Location:
    Germany
    Introduction:

    I don't know how many guys of you would like to or actually play the Game in a different language than English. I play CIV V in German for instance. When you use CPP and you want to play the Game in German for instance, you may have to change some parameters to get the full experience.

    If you don't do this, you will have missing information like an unchanged policy tree, technology tree, or not updated unit information.

    I hope I can help some of you guys by showing how to change what, to make it compatible for your language. After this all features will be shown correctly, but keep in mind that this procedure will not translate the Mod automatically to German for instance.


    Understand a Mod:

    The thing is, that you have to know what's going on in the mod. For instance, I play the Game in German and I use some mods which were created in English. So normally I will have English text strings in my German Game for new content, like buildings or technologies.

    • XML-Files
      The explanation for buildings, or how they are named, is written in an xml-file like this:
      Code:
      This is for example the BuildingText.xml file of the CSD Mod.
      
      <?xml version="1.0" encoding="utf-8"?>
      <!-- Created by ModBuddy on 4/2/2011 2:22:56 PM -->
      <GameData>
      	<Language_en_US>
      		<!--Diplo Building Names-->
      		<Row Tag="TXT_KEY_BUILDING_CHANCERY">
      			<Text>Chancery</Text>
      		</Row>
      		<Row Tag="TXT_KEY_BUILDING_WIRE_SERVICE">
      			<Text>Wire Service</Text>
      So when I play the Game in German for instance, the Game will search for an <Language_de_DE> string to display the content of the mod in German. If there is no string for German the Game will use the default English text strings of the mod. So if you ever want to translate a mod to Polish for instance, you could copy the text strings of the <Language_en_US> CONTENT </Language_en_US> and paste it in the same file plus renaming the new text string to <Language_pl_PL> CONTENT </Language_pl_PL>.

      So this will explain why some features of the mod are working, or why they are displayed in English, when you play the Game in German for instance.

    • SQL-Files
      Next are sql-files. They will mostly change content of the original vanilla Game, for example policies. You can recognize them by these lines:
      Code:
      This is for example the BuildingRules.sql of the CSD Mod.
      
      UPDATE Language_en_US
      SET Text = 'Empire enters a [ICON_GOLDEN_AGE] Golden Age. Gain 20 [ICON_GOLD] Gold each time a Great Person is expended. Each source of [ICON_RES_MARBLE] Marble or [ICON_RES_STONE] Stone worked by this City produces +2 [ICON_GOLD] Gold.'
      WHERE Tag = 'TXT_KEY_WONDER_MAUSOLEUM_HALICARNASSUS_HELP'
      AND EXISTS (SELECT * FROM CSD WHERE Type='ANCIENT_WONDERS' AND Value= 1 );
      These replacements are different from the xml-files, because only the English language file of the original Game will be changed.
      So when you play the Game in Polish you will get the English text strings of the xml-files but not of the sql-files. To play the Game in a different language than English, you have to replace the line UPDATE Language_en_US to UPDATE Language_pl_PL, or for German to UPDATE Language_de_DE.

      So this will explain why you can not see the changes of the tech or policy tree, because the changes are only made in the original English language file, of your CIV V installation.


    How to make SQL-Changes ready for your language:

    As you know now it would be a lot of work to change each language tag in the SQL-files by hand. Finding out which SQL-file contains those tags could be also a problem for you. Glad to have Notepad++ !

    You will need Notepad++ in order to succeed this tutorial. It is simply an advanced version of your Windows Notepad (greatly simplified): Download

    • Alter the CPP-Files!
      1. Download and install the Community Patch Project via the "How to install" thread. If you are an unexperienced user use the installation guide to do it correctly.
      2. After the installation, navigate to your mods folder of Civ V: Documents\My Games\Sid Meier's Civilization 5\Mods
      3. Open another instance of the explorer (a new window) and choose a destination for creating a "working" folder. A temporary folder in which we will made the alterations. I chose my download folder for instance.
      4. From your mods folder, copy all listed folders from there to the "working" folder:
        • Civ IV Diplomatic Features
        • Community Balance Patch
        • Community Balance Patch - Compatibility Files (EUI)
        • Community Patch
        • CSD for CBP
        • More Luxuries
      5. You will get something similar like me:
        ladida.png
      6. Open Notepad++
      7. Click Search -> Replace or hit Ctrl+H
      8. Switch to the "Find in Files" tab
      9. Enter the information down below:
        • Find what: Language_en_US
        • Replace with: Language_de_DE (or any other language than English)
        • Filters: *.sql (You only want to replace those lines in sql-files
        • Directory: PATH TO THE FOLDER OF STEP 1, for example: E:\Downloads\working
        notepadsettings.png
      10. Hit "Replace in Files"
      11. You will get a small information in blue about the amount of replacements.
      12. Read the following headline of "Fix Happiness-Calculation issues"

    • Fix Happiness-Calculation issues:
      When you play the game in a different language than English, you might will get some issues in the calculation of the Happyness.
      The displayed information will be broken or messed up. It has something to do with how a decimal digit is displayed:

      In English (so in this mod) a figure is rounded to two digits after the decimal point like in this scriptline of the mod (pay attention to the dot):
      Code:
      Locale.ToNumber( pPlayer:GetUnhappinessFromCityCount() / 100, "#[COLOR="Red"].[/COLOR]##" );
      If you play the game in a different language, you might come from a country in which the decimal place is a comma. Like in Germany, or France, or.. I guess in most European countries..

      So the Script will need a , instead of a . Americans would say $100.00 and we would say 100,00 &#8364;.. If you say it like the Americans just ignore the following guide ;)
      1. Open Notepad++
      2. Click Search -> Replace or hit Ctrl+H
      3. Switch to the "Find in Files" tab
      4. Enter the information down below:
        • Find what: #.##
        • Replace with: #,##
        • Filters: *.* (this time we will not restrict the replacement)
        • Directory: PATH TO THE FOLDER OF STEP 1, for example: E:\Downloads\33CPP-new
      5. Hit "Replace in Files"
      6. You will get a small information in blue about the amount of replacements.
      7. Now your subfolders in your "Working folder" are ready for install.
    • Last Step:
      If you replaced the specific lines in the sql-files and maybe using the fix for the Happiness-Calculation, you just have to copy all folders from your working directory to the mods directory and hit "REPLACE ALL". That's it.

    The Result:
    All information and all text strings should be now shown correctly. This Tutorial could also be used for other mods changing content via a SQL-File. Please be aware that this procedure will not translate the mod magically to your native language, it will just be displayed correctly..
    • A side note: Only those folders contain language strings that must be altered. For future purpose I recommend to copy all folders to the working directory anyway:
      • Community Balance Patch
      • Community Balance Patch - Compatibility Files (EUI)
      • Community Patch
      • CSD for CBP

      [*]A side note II: The CSD for CBP already contains German sql files. If you play the game in German, you don't need to copy that folder to the working directory from step four.
     

    Attached Files:

  2. Estebanium

    Estebanium Prince

    Joined:
    Oct 16, 2014
    Messages:
    483
    Gender:
    Male
    Location:
    Germany
    Would it be possible to change the Thread Title to this one:
    [HowTo] Play the Game in an other language than English with CBP and CP

    This would fit much better, because it points out when I need to adjust the files.
     
  3. WileyNg

    WileyNg Prince

    Joined:
    Aug 17, 2013
    Messages:
    595
    Location:
    Hong Kong
    [Like!]

    Really grateful for your contribution!
     
  4. legoras

    legoras Chieftain

    Joined:
    Apr 24, 2012
    Messages:
    61
    This thread it is freaking good!

    Thanks for a totally easy quide.
     
  5. Gidoza

    Gidoza Emperor

    Joined:
    Jul 26, 2013
    Messages:
    1,273
    Well, I followed the instructions to the letter as far as I can tell, and everything is displaying itself just as incorrectly as before. Would it make a difference if I`m using the multiplayer version of the mod? What I don`t get I suppose is your last instruction where you say to then do the installation as usual: the only installation for the multiplayer version is to put the folder in the right place, so I don`t know...?
     
  6. Estebanium

    Estebanium Prince

    Joined:
    Oct 16, 2014
    Messages:
    483
    Gender:
    Male
    Location:
    Germany
    I wrote this tutorial for an older version of the Community Patch Project. Long time ago it was only possible to install the project manually, before Gazebo established the automatic setup. So now it is a bit different, but not completely wrong:

    • Alter the CPP-Files!
      1. Download and install the Community Patch Project via the "How to install" thread. If you are an unexperienced user use the installation guide to do it correctly.
      2. After the installation, navigate to your mods folder of Civ V: Documents\My Games\Sid Meier's Civilization 5\Mods
      3. Open another instance of the explorer (a new window) and choose a destination for creating a "working" folder. A temporary folder in which everything following will happen. I chose my download folder for instance.
      4. From your mods folder, copy all listed folders from there to the "working" folder:
        • Civ IV Diplomatic Features
        • Community Balance Patch
        • Community Balance Patch - Compatibility Files (EUI)
        • Community Patch
        • CSD for CBP
        • More Luxuries
      5. You will get something similar like me:
        11.png
      6. Open Notepad++
      7. Click Search -> Replace or hit Ctrl+H
      8. Everthing down below is still valid, so please follow the guide from now on.
        So continue with step five of the original tutorial
    After the alteration of the CPP files and maybe using the fix for the Happiness-Calculation, you just have to copy all folders from your working directory to the mods directory and hit "REPLACE ALL". That's it.

    A side note: Only those folders contain language strings that must be altered. For future purpose I recommend to copy all folders to the working directory anyway:
    • Community Balance Patch
    • Community Balance Patch - Compatibility Files (EUI)
    • Community Patch
    • CSD for CBP

    A side note II: The CSD for CBP already contains German sql files. If you are german, you don't need to copy that folder to the working directory from step four.


    EDIT: I updated the old tutorial.
     
  7. darko82

    darko82 Emperor

    Joined:
    Dec 5, 2005
    Messages:
    1,318
    Location:
    Poland
    How much text/many lines/words are there to translate CP full edition (more or less)?
     
  8. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,171
    Gender:
    Male
    Location:
    Little Rock
    Lots. Most text in the CP is in the NewText, NewText2, and TextChanges files. In the CBP, it's divided up a bit more.

    G
     
  9. darko82

    darko82 Emperor

    Joined:
    Dec 5, 2005
    Messages:
    1,318
    Location:
    Poland


    BTW, does this include civilopedia entries? Are they included at all? I know that CSD is fully included in it; not sure about the rest?
     
  10. Gazebo

    Gazebo Lord of the Community Patch Supporter

    Joined:
    Sep 26, 2010
    Messages:
    18,171
    Gender:
    Male
    Location:
    Little Rock
    Should include most, if not all CP text. CBP is fragmented (text is updated next to units/buildings, instead of in one ur-file). Someday I'm going to reorganize the CBP...but not today. :)

    D
     
  11. Titule

    Titule Chieftain

    Joined:
    Jan 6, 2006
    Messages:
    20
    I noticed that the .modinfo file of the mods contains a md5-hash of the files.
    Am I wrong or would that md5 need to be updated when you global-replace the strings? If I'm right, how come that this still works?:confused:
     
  12. tu_79

    tu_79 Deity

    Joined:
    Feb 11, 2016
    Messages:
    7,341
    Location:
    Malaga (Spain)
    No, you don't need to edit that. I think that's needed when you subscribe to a mod in Steam Workshop, to verify the downloaded file. It could be also needed when playing multiplayer online, not sure. If you play off-line it works well with the method described. Additionally, if you dare to translate some texts, remember to convert sql files to UTF-8 encoding.
     
  13. Kwamer86

    Kwamer86 Chieftain

    Joined:
    Apr 5, 2016
    Messages:
    13
    It's not working for me. Not sure what I'm doing wrong here.

    Wanted to edit this modpack: http://forums.civfanatics.com/showthread.php?t=553187

    and play it in german language (so far as possible). after following this guide I still don't have updated policies.
     
  14. m9731526

    m9731526 Chieftain

    Joined:
    Jul 26, 2016
    Messages:
    3
    Hey, I started a issue about Language compatibility, and then Gazebo suggest I come to you.
    Github


    Alright, after many tests the method in the thread doesn't work.
    I can understand that this may not be possible, but still want to figure it out.

    Even if I replace all Language_en_US with other string like Language_zh_Hant_HK, nothing happens, the text still only shows up in English game.
    I mean, why? these sql should be the only source of the updated in-game text, and if I change the language key, shouldn't it affect English game at least? It seems that the language key are doing nothing?

    *Great, I've found out that the modpack use a override xml replace a lot of in-game text only to en_US, so that's why modifying sql doesn't work. I'll try to partially change the xml to correct policy tree.
     
  15. Estebanium

    Estebanium Prince

    Joined:
    Oct 16, 2014
    Messages:
    483
    Gender:
    Male
    Location:
    Germany
    Hi m9731526,

    welcome to the forum of CivFanatics. I read your issue report on github and saw that you are using the Multiplayer Pack of Vox Populi. Unfortunately using a DLC with a different language than English could be a problem if I read the guide on Steam and CivFanatics. So this could be the problem for you.
    I would like to give you some advice, anyway. Maybe this will work for you.

    So let's try to fix your Multiplayer Pack:
    • First of all, I would like to ask you if you are using any mods that are in your mods folder: Documents\My Games\Sid Meier's Civilization 5\
    • Furthermore, is a folder called "UI_bc1" located here: steamapps\common\Sid Meier's Civilization V\Assets\DLC
      If yes it must be deleted.
    If you are not using any mods and just the DLC mod of Vox Populi (only MP_MODSPACK_5-21_EUI), it will be a lot easier to track down the problem and to see if it can be fixed.

    Ok to be on the save side, navigate to "steamapps\common\Sid Meier's Civilization V\Assets\DLC" and delete the Multiplayer Mod Pack. Copy the original folder to the DLC folder afterwards, so you can be sure that it is an unmodified version of the original pack. If you altered the MP-mod e.g. in your Downloads folder, you need to download it again and copy the original version to the DLC folder. So now you should be in the same state, before you changed anything on the DLC.

    Do you use Notepad++? If not download and install it. It will help you in the following steps:
    1. Open Notepad++
    2. Hit search, find in files
    3. The directory will be the path to your Multiplayer Mod DLC. For me it is e.g. D:\Spiele\SteamLibrary\steamapps\common\Sid Meier's Civilization V\Assets\DLC\MP_MODSPACK_5-21_EUI
    4. Find what: language_en_US
    5. Replace with: *LANGUAGE_KEY* see down below for more information
    6. Filters: *.sql
    7. Hit Replace in Files
    8. A message in blue will tell you that xxx files had been replaced.
    9. Do this again with Filters *.xml

    *LANGUAGE_KEY*
    • First be sure that your game is set to your native language.
    • Navigate to "steamapps\common\Sid Meier's Civilization V\Assets\DLC\DLC_01\Gameplay\XML\Text"
    • Here you can see all possible language tags and as far as I know, these are the only languages available that you can use. Those are also the only available languages that you could choose if you do a right click on CIV V in steam, hit properties and then languages.
    • So maybe you play in Chinese so you language tag is: Language_ZH_Hant_HK
    • To be clear, as far as I know, it is not possible to play in other languages than listed in the folder. So using a special language tag for a local speech, that is used in a tiny town of Taiwan will not work ;)
    After altering the files with Notepad++, navigate to "Documents\My Games\Sid Meier's Civilization 5" and delete the following folders: cache, logs, ModUserData.
    This will cause the game to reload all data and to take the new language files of the DLC. If you start a game then, you should see everything in place.
     
  16. m9731526

    m9731526 Chieftain

    Joined:
    Jul 26, 2016
    Messages:
    3
    Hi Estebanium, thanks for the quick reply.

    Like I mentioned in the github issue, I've fixed the policy tree problem: the reason of the issue is that the modpack use Override/CIV5Unit_Mongol.xml to override basically all in-game text, so modifying this xml will work instead of the sql files in Mods' sub folders.

    To fix this I simply picked policy-related <replace> and copy them to a new <Lauguage_zh_Hant_HK>, then edit the content. Or maybe your translator will work better for this case? would appreciate if it do!

    The problems I currently have are 1) I can't find civilizations' feature text, so I can't correct that, 2) I am not sure is there any more text which is not match to mod content.

    and I'm not sure if I need to edit the xmls in mods' sub folder, it seems unnecessary.
     
  17. Estebanium

    Estebanium Prince

    Joined:
    Oct 16, 2014
    Messages:
    483
    Gender:
    Male
    Location:
    Germany
    I am sorry, but I don't understand your problem. So I backup-ed my Mods folder, deleted Cache, Mods, Logs, ModUserData and Downloaded MP_MODSPACK_5-21_EUI.
    Still in the Download folder, I opened Notepad++ followed my recently written little tutorial. Replaced all xml and sql language tags and copied the folder to Assets\DLC.
    I started Steam, switched the language to traditional Chinese and started the game. While the loading screen was Chinese, all other text was English. I don't know if this is normal. I hit SinglePlayer (still all menus in Engish), chose my Civ and noticed that Greece had their correct UA. See here: LINK

    As far as I can see it, using the DLC Mod for Multiplayer will result in English text, so it would make more sense to play it in English then. It will turn out the same.

    Did another test. I deleted MP_MODSPACK_5-21_EUI in Assets\DLC, deleted Cache, Logs, ModUserData. I downloaded Vox Populi 7-15 and installed it. I navigated to my mods folder, under My Documents. Only Vox Populi mod were in the folder. I started Notepad++ and followed my own tutorial again, choosing the mods folder as the target directory. Replaced xml and sql language tags with Language_ZH_Hant_HK and started the game. Game language was still traditional Chinese. The game loaded and I noticed that the text of the menus was not there, but I guess it is because I don't have those fonts, or because my Windows is German, whatever. Being a veteran on navigation, I chose Mods and started a game. The UA was still correct, even if the Civ history was not there. So I guess it is working better if you choose the normal mods version for just playing singleplayer or hotseat with your friends. If you want to play Multiplayer over internet I would suggest to switch your game language to English.
    Here is another screenshot folder: LINK
     
  18. m9731526

    m9731526 Chieftain

    Joined:
    Jul 26, 2016
    Messages:
    3
    Yes, using your method will cause the game to be in English, and of course it's not normal, this is related to the structure of the modpack:
    Under MP_MODSPACK_5-21_EUI, there's a Override folder, which contains a CIV5Unit_Mongol.xml. Though I don't know why, but all in-game text (which are in English) are set again to en_US with this xml. So if you simply replace all en_US with zh_Hant_HK, it will cause the game in English (because all content in Language_zh_hant_HK in CIV5Unit_Mongol.xml are still English, it override the whole game).

    The xml cover those strings which are defined in sql, so editing sql and xml in Mods folder does nothing, that's why there's someone saying that this thread is not working for the modpack.

    And how I fixed the policy part is that, in CIV5Unit_Mongol.xml, I add a <Language_zh_Hant_HK> after </Language_en_US>, then search for "policy" in the file, copy the section which is all about policy name and help to <Language_zh_Hant_HK>, by this the policy tree in my zh_Hant_HK game is correct but in English now, but I can translate the text under <Language_zh_Hant_HK> and it will take effect in-game.

    So I actually have resolved how to fix the "wrong infomation" issue (such as policy screen), but there are more incorrect info in-game such as the effect of the wonders, or civilizations' unique feature, and weirdly I couldn't find strings of civilization features.
     
  19. Seeks

    Seeks Chieftain

    Joined:
    Nov 1, 2019
    Messages:
    3
    Gender:
    Male
    Dont want to be a necromant, but is this still needed to get the CP working? Or is this obsolete with the installer?
     
  20. diego_wael1972

    diego_wael1972 Chieftain

    Joined:
    Jun 21, 2020
    Messages:
    1
    Yes, unfortunately you will have to continue to do the steps of this guide, as there is no other translation in other languages than English.

    I would also like to point out that:
    is incorrect.

    So it's best to copy all mods of "Vox Populi" into an extra folder ("working") so you don't forget any sql file.
     

Share This Page