Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
#526251 24/07/14 12:21 AM
Joined: May 2014
A
apprentice
OP Offline
apprentice
A
Joined: May 2014
In this thread I intend to recopilate all the information useful to translate the game, avoiding language specific issues (such as 'how to translate this or that').

I want to thank Norbyte for giving me almost all this information (as you can see below).

The first thing you shall do is locate the folder Data/Localization. Make a backup of this folder, just in case.
You will see a folder named English and a file named language.lsx. Edit the file with a text editor that doesn't change codification. I think that Notepad++ is a good choice. At 11th line you can read vale="English". Change the word English for the name of your language. Don't delete the quotes.

And that's all! No, it's a joke. Now make a copy of the folder English (with all its contents), also inside the folder Localization. Rename it with the lenguage of your choice. Go inside and rename the file english.xml and the file Gender/Female/english.xml. Edit them with the same application.

Now the task is simply translate every line in these files (more than 20,000); this is clearly too much work for a single person, so gather a team and split the file to divide the job. Note that you cannot use xml specific characters such '</>. You must use instead scape sequences such as
Code
&apos;


Don't even think to change anything between angle brackets <>. This is xml code, and if the file has a single syntax error, the Game Engine will ignore your file and read the text chunks fron Data/Main.pak, in English. See below if you suspect that you have accidentally changed something.

I think that all the game text is in these two files, with an exception: the subtitles of the videos.


Subtitles are, among many many other things, in the main.pak file. You can unpack the file with lstools (see this post). The subtitles are (after unpacking) in Mods/Main/Subtitles. Surprising, isn't it? They are in several files, each one for a video. You can see the contents of these files with a good text editor (again, Notepad++ does the job). But you needn't edit the files, only read them.

Open, for example, the file named Intro_Scene.lsx. The 16th line says:
Code
<attribute id="Text" value="In the days of old, the Sourcerers of Rivellon cured the sick" handle="hbbd3a08cg3cd1g4d21gb9d3g1a646642dfee" type="28" />


This is the very first subtitle in the game. Note the long hexadecimal code assigned to the variable handle. Now, go to yourLanguage.xml file and add a line like the following (between the ContentList tags):
Code
<content contentuid="hbbd3a08cg3cd1g4d21gb9d3g1a646642dfee">Hace mucho tiempo, los Magos Primordialistas de Rivellon curaban a los enfermos</content>

This is Spanish. Of course, write it in your language. But the trick is that the value of the variable contentuid is the same as handle's. This seems to override the contents of main.pak file, and the subtitles are so displayed in your language. Do the same with every subtitle and, now serously, that's all.

Last edited by ajotatxe; 24/07/14 11:30 AM.
Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
OK, this is how to make localization for your language work:
1) Copy the contents of the Data\Localization\English directory, and paste it to a new directory called Data\Localization\Spanish
2) Rename the relevant .xml files inside (english.xml -> spanish.xml, Gender\Female\english.xml -> Gender\Female\spanish.xml)
3) Change the contents of Data\Localization\language.lsx from this:
Code
                    <attribute id="MapKey" value="Language" type="22" />
                    <attribute id="Type" value="1" type="5" />
                    <attribute id="Value" value="English" type="20" />

... to this:
Code
                    <attribute id="MapKey" value="Language" type="22" />
                    <attribute id="Type" value="1" type="5" />
                    <attribute id="Value" value="[b]Spanish[/b]" type="20" />

4) Changing anything in your new spanish.xml should work now:
[Linked Image]

Joined: May 2014
A
apprentice
OP Offline
apprentice
A
Joined: May 2014
First, thank you for your answers. This one surely would have been great before the aforementioned patch. But I have the version 1.0.81.0 of the game, that ignores the file language.lsx. Anyway, I have tried it, with no result.

In fact, after the try, I have renamed the folder Data/Localization, and the game runs properly (in English).

Last edited by ajotatxe; 24/07/14 05:06 AM.
Joined: Apr 2013
N
addict
Offline
addict
N
Joined: Apr 2013
My game is v1.0.81 too, and the language mod works frown
Are you sure you did the changes correctly?
This is my Localization folder: https://dl.dropboxusercontent.com/u/32263228/dos/Localization.zip

Joined: May 2014
A
apprentice
OP Offline
apprentice
A
Joined: May 2014
Ok, thank you very much.

The problem was that my xml file had a syntax error (I accidentaly deleted a </content> tag). I supposse that if that is the case, the game ignores it and take all data from the pak file.

I have beean able to locate the error pasting the contents into this page. I have made a dichotomous search of the error, that is, I pasted a half of the contents. If it has an error, I paste a half of this half; else, I paste a half of the other half, and so on. (This paragraph I have included just in case of somebody has the same problem).

Thank you again.

Last edited by ajotatxe; 24/07/14 06:06 AM.
Joined: May 2014
A
apprentice
OP Offline
apprentice
A
Joined: May 2014
If some french, russian, polish or german player is reading this, I'd like to know if the dialogs change with the gender of the characters. Thank you.


Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5