Difference between revisions of "Modding: Localization"

From Divinity Engine Wiki
Jump to: navigation, search
(Language Spreadsheet)
(Exporting)
Line 37: Line 37:
  
 
The translations from the different columns go to the following files:<br />
 
The translations from the different columns go to the following files:<br />
* '''column F''': '''''~DivinityEngineDataPath~\Data\Editor\YourMod\Localization\YourLanguage\YourLanguage.xml'''''
+
* '''column F''': '''''~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\YourLanguage.xml'''''
* '''column G''': '''''~DivinityEngineDataPath~\Data\Editor\YourMod\Localization\YourLanguage\YourLanguage_to_F.xml'''''
+
* '''column G''': '''''~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\YourLanguage_to_F.xml'''''
* '''column H''': '''''~DivinityEngineDataPath~\Data\Editor\YourMod\Localization\YourLanguage\Gender\Female\YourLanguage.xml'''''
+
* '''column H''': '''''~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\Gender\Female\YourLanguage.xml'''''
* '''column I''': '''''~DivinityEngineDataPath~\Data\Editor\YourMod\Localization\YourLanguage\Gender\Female\YourLanguage_to_F.xml'''''
+
* '''column I''': '''''~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\Gender\Female\YourLanguage_to_F.xml'''''
 
<br />
 
<br />
  
 
The Visual Basic script, at ''~DivinityEngineDataPath~\Data\Editor\Localization\export.vb'' can be used to automate this process for Microsoft Excel.
 
The Visual Basic script, at ''~DivinityEngineDataPath~\Data\Editor\Localization\export.vb'' can be used to automate this process for Microsoft Excel.

Revision as of 15:44, 8 March 2018

Localization files are used to provide the different languages in which the game can be played.
It is possible to create a similar file structure in your own Add-on or Adventure.
This way, you can alter existing languages or provide your own.


File structure

In ~DivinityEngineDataPath~\Data\Editor\Localization\English you can find example files that show the file structure:

  • Gender/Female/english.xml: contains specific lines when the speaker's gender is taken into account.
  • Subtitles/...: Contains subtitle files for all videos. Videos files themselves are not provided due to size. You can also add new files here if your project has custom movies.
  • english.xml: Contains all regular lines for the specific language (English in this example)
  • language.lsx: Defines the language by name. This is a copy of the file in ~DivinityEngineDataPath~\Data\Localization. The file in that location determines which language is active in-game.


Language Spreadsheet

The spreadsheet at ~DivinityEngineDataPath~\Data\Editor\Localization\loca_full.xls contains all the game's english lines.
It is recommended to use this file for translating a language, opposed to manually editing the language.xml files.

The spreadsheat has columns for the different types of translations, which can be exported:

  • column F: translation - male to male or default translation
  • column G: translation_F - female speaker to male or to anyone if H not filled in
  • column H: translation_to_F - male to female or any to female if I not filled in
  • column I: translation_F_to_F - female speaker to female speaker


Best Practice

  1. Do not sort or reorder anything. Only type in columns F to I.
  2. Developer comments, context and other information is available in columns J, K, L, etc.
  3. In "DIALOGUES" tabs, if you are wondering who says the line, look at column N and O.
  4. Columns G, H and I are only for "DIALOGUES" tabs and are not taken into account in any other tab.


Exporting

The translations from the different columns go to the following files:

  • column F: ~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\YourLanguage.xml
  • column G: ~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\YourLanguage_to_F.xml
  • column H: ~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\Gender\Female\YourLanguage.xml
  • column I: ~DivinityEngineDataPath~\Data\Editor\Mods\YourMod\Localization\YourLanguage\Gender\Female\YourLanguage_to_F.xml


The Visual Basic script, at ~DivinityEngineDataPath~\Data\Editor\Localization\export.vb can be used to automate this process for Microsoft Excel.