I18N - Translating Fan Missions: Difference between revisions
m typo |
m mention strings/english.lang |
||
Line 28: | Line 28: | ||
maps/outpost.script | maps/outpost.script | ||
maps/outpost.aas32 | maps/outpost.aas32 | ||
strings/fm/english.lang // include a copy of this, so the FM package | |||
// also works stand-alone | |||
outpost_l10n.pk4: | outpost_l10n.pk4: |
Revision as of 06:34, 28 November 2011
Introduction
darkmod.txt
In addition, if you translate strings in darkmod.txt, DO NOT translate the field names like Author:, Required TDM Version: etc. These must stay in English, or TDM will not be able to interpret them. Only translate the text that comes after them! If you use I18N.pl, this will be automatically done for you, you should not edit darkmod.txt in this case!
If you want to add your name to the credits, include it in a README.txt file inside YOURFM_l10n.pk4 file.
FM Specific Dictionaries
These dictionaries live in the directory strings/fm/ and must follow a specific format, explained below. The name for such a dictionary is always LANGUAGE.lang, f.i. "english.lang".
The string IDs for FMs are 20000 … 89999, using these ensures that they do not conflict with strings from the TDM core. Note that if you have a string that matches one of the other core strings (like "Silver Key", "#str_10000"), then you should use just the core string ID. This saves the translators to translate the string again.
You MUST also separate them from the rest of your FM into their own package called "YOURFM_l10n.pk4" where YOURFM is the name of your original PK4 file. This ensures that TDM can install/update the I18N package properly.
Let's see how this looks for the FM named Outpost, which provides two translations (English and French):
outpost.pk4: xdata/outpost.xd maps/outpost.map maps/outpost.cm maps/outpost.proc maps/outpost.script maps/outpost.aas32 strings/fm/english.lang // include a copy of this, so the FM package // also works stand-alone outpost_l10n.pk4: strings/fm/english.lang strings/fm/french.lang README.txt // f.i. with credits for translators
Note that all files names should be in lowercase, otherwise there can be problems under Linux.
Example dictionary, note the entire content is wrapped in "{ }"
// String table english (iso-8859-1) for: The Outpost // This file was generated automatically on 2011-08-20 13:56 UTC by i18n.pl v0.02 { "#str_20000" "The Outpost" "#str_20001" "Break into a builder outpost to retrieve a gold ingot." "#str_20002" "Gold Ingot" "#str_20003" "Leave the outpost after your main objectives are done and get back to the front gates." "#str_20004" "You won't find bags full of money in a builder outpost, but take away any valuables you can get hold of. Find valuables worth at least 600." "#str_20005" "You won't find bags full of money in a builder outpost, but take away any valuables you can get hold of. Find valuables worth at least 700." "#str_20006" "No knock outs too." "#str_20007" "Killing is not your style. No corpses tonight." "#str_20008" "You won't find bags full of money in a builder outpost, but take away any valuables you can get hold of. Find valuables worth at least 800." "#str_20009" "The massive gold ingot should be worth a fair amount of money. Find out where the ingot is kept and change its ownership." }
This setup makes it easier to translate the FM, because an translator needs only to copy english.lang to german.lang, change the strings, repackage the outpost_l10n.pk4 file, and it works!
See Also
- I18N - Main article
Translation resources
- The charset TDM fonts use
- I18N.pl - a script to transform a FM into a mission and I18N data
- Bug Tracker entry #2779
- Text Decals for Signs etc.
- Fonts in TDM
- Font Conversion & Repair - with links to ExportFontToDoom3, Q3Font, Refont, and Font Patcher
Overview of translations
- I18N Status - Which FMs are translated into which language (not entirely up to date)
- Translating FMs
- List of translators
- Translator's Guide
Translation discussions