Modding:Localization

From bg3.wiki
Jump to navigation Jump to search

Localization[edit | edit source]

This is the file that tells the game what text to show, either for subtitles, for item names and descriptions, the text in books and notes as well as the names you see in character creation. It is basically used for any text you see in the game.

For mods you will need them when adding anything that requires in game text.

Good to know[edit | edit source]

An example of when you sometimes have to be careful with order in your localization file is piercing sets. You want to first list the names of your piercing assets and then the set names.

Translating Mods to other Languages[edit | edit source]

As an alternative to this page there is this guide on the nexus by bk0n9.

+ a template/example on this page by Padme4000

So you want to patch for another mods Localization to add another language? Well here is a how to on how that works.

First and foremost it is best to ask the mod author if they are okay with you translating their mod. 99% of the time modders are completely fine with people translating their mods. They just like to know so they can link to it directly on their pages when it is published.

As sadly adding the main mod as a requirement does not notify the mod creator of your translation.

Creating the Patch[edit | edit source]

So we would then first make our main workspace folder for this new translation mod. For example you might name it after the mod and then have the language in the name.

In this folder you need to copy from the original mod to patch for it:

  • Localization/English folders with the .loca
    • it may be listed as .loca.xml if you unpacked with Multitool. You can keep that extension if you unpacked with it as it will convert back to .loca on repacking with multitool.

You do not need any of the other folders from the original mod.

Change the English folder name to the name of the language you are translating it for. For example if we were to translate the mod to German we would change the English folder to German. From asking around it is the English name of the language. This is why German is German and not Deutsch.

If .loca you will want to convert it to xml via lslib

Once you have the .xml or .loca.xml open it in your preferred editing software. For instance some use Notepad ++ and some use vscode.

You will find lines like this: (this example only has one line that would need to be translated)

<?xml version="1.0" encoding="utf-8"?>
<contentList>
	<content contentuid="h00a33f75ge607g4aa2ga34ag4e2849aa53f9" version="1">Text Here</content>
</contentList>

So from this you want to translate the text from this line:

	<content contentuid="h00a33f75ge607g4aa2ga34ag4e2849aa53f9" version="1">Text Here</content>

That is in between the > < do not edit version or the contentuid in this example do not change the contentuid h53fa0dfcg318dg4ff8g88f0gb2e8948af876.

So for example using the Translating to German the line above would become:

	<content contentuid="h00a33f75ge607g4aa2ga34ag4e2849aa53f9" version="1">Text Hier</content>

Once we have finished translating we need to create our own Meta.lsx you can follow this tutorial Modding:Creating meta.lsx once you have done this you can pack up your mod and test to see if your translations are showing up as they should. To be safe load it below the original mod in the load order. If you are still running into issues try adding the original mod as a Modding:Dependencies