Difference between revisions of "Translations (OpenXcom)"

From UFOpaedia
Jump to navigation Jump to search
m
Line 1: Line 1:
Like [[GeoScape String Files|the original]], OpenXcom supports translation of all ingame strings. However, the format has been changed to make it easier to edit, maintain and add support for Unicode. They are stored in the ''Data\Language'' folder.
+
Like [[GeoScape String Files|the original]], OpenXcom supports translation of all ingame strings. However, the format has been changed to make it easier to edit, maintain and add support for Unicode. Currently the easiest way to translate is to use the [http://www.getlocalization.com/openxcom/ online tool].
 
 
== Format ==
 
 
 
Language files are stored in plain-text UTF-8 (no BOM) format with Linux linebreaks. If you don't know what this is, get a text editor that does (I recommend [http://notepad-plus-plus.org/ Notepad++] for Windows users). Here's a typical language file:
 
 
 
<pre>
 
ENGLISH (US)
 
STR_AVENGER_UFOPEDIA
 
TRANSPORTER AND COMBAT SPACECRAFT.  THE ULTIMATE REPLICATION OF ALIEN TECHNOLOGY.
 
STR_INTERCEPTOR_UFOPEDIA
 
COMBAT AIRCRAFT WITH DUAL PULSE DETONATION ENGINES AND SPECIALLY SHIELDED ELECTRONIC SYSTEMS.  THE BEST AVAILABLE EARTH BASED TECHNOLOGY.
 
STR_LIGHTNING_UFOPEDIA
 
TRANSPORTER AND COMBAT CRAFT.  A CRUDE BUT EFFECTIVE REPLICATION OF ALIEN PROPULSION SYSTEMS.
 
STR_SKYRANGER_UFOPEDIA
 
TROOP TRANSPORTER.  THE FASTEST OF ITS KIND, WITH VERTICAL TAKE OFF AND LANDING (V.T.O.L.) CAPABILITY.
 
STR_FIRESTORM_UFOPEDIA
 
COMBAT CRAFT.  THIS ONE-MAN FIGHTER REPLICATES THE CLASSIC ALIEN FLYING SAUCER DESIGN, WITH CENTRAL PROPULSION UNIT.
 
...
 
</pre>
 
 
 
The first line contains the language name ''in its native language'' as displayed in the Language window. The rest of the text are just key-string pairs, separated by linebreaks. Language files are placed in the ''Data\Language'' folder and have the .lng extension.
 
 
 
To make your own translation, just copy an existing language file and edit the strings with your favorite text editor. '''Do not edit the keys or any text between {}'''.
 
  
 
== Guidelines ==
 
== Guidelines ==
 
* Don't add linebreaks: The game automatically word-wraps text, and any explicit linebreaks are marked with {NEWLINE} and {SMALLLINE}.
 
* Don't add linebreaks: The game automatically word-wraps text, and any explicit linebreaks are marked with {NEWLINE} and {SMALLLINE}.
* Preserve the original structure: Keep any spaces, uppercases, etc that the original string has, don't go trimming and cleaning up for no good reason.
+
* Preserve the original structure: Don't change text inside {} tags and keep any spaces, uppercases, etc. that the original string has, don't go trimming and cleaning up for no good reason.  
 
* Be consistent: Don't make the text look schizophrenic, stick to one style throughout. If a word has multiple translations, choose one and stick with it. If working with multiple translators, be sure to work this out before-hand.
 
* Be consistent: Don't make the text look schizophrenic, stick to one style throughout. If a word has multiple translations, choose one and stick with it. If working with multiple translators, be sure to work this out before-hand.
 
* Don't use an automatic translator: We're not robots.
 
* Don't use an automatic translator: We're not robots.
 
* Review your work: Again, we're not robots and make mistakes every now and then. Don't forget to use a spellchecker.
 
* Review your work: Again, we're not robots and make mistakes every now and then. Don't forget to use a spellchecker.
* Pay attention to length: while most of the interface is fairly roomy (eg. Ufopaedia screens), some elements just can't fit a lot of words into a tight 320x200 screen (eg. columned lists). Remember you can test your translation ingame anytime.
+
* Pay attention to length: while most of the interface is fairly roomy (eg. Ufopaedia screens), some elements just can't fit a lot of words into a tight 320x200 screen (eg. columned lists). Remember you can test your translation ingame by downloading the file to your Language folder.
  
 
== Graphics ==
 
== Graphics ==
  
Sadly a translator's job isn't just replacing strings. Sometimes you also need to have a little bit of artistry. OpenXcom stores all its graphics in a raw paletted format, which can be edited by some graphics programs. You can find more details on doing so [http://openxcom.org/forum/index.php/topic,1163.0.html here].
+
Sadly a translator's job isn't just replacing strings. Sometimes you also need to have a little bit of artistry. The game uses bitmap fonts to display text, so if your language has new characters that it doesn't support, you'll have to add them in yourself. The font files are PNG images in the Llanguage folder, which are referenced by a ''Font.dat'' text file which contains all the characters in the fonts (in UTF-8). To add a character you just put it at the end of the ''chars:'' in ''Font.dat'' and then draw them into the font files (both lowercase and uppercase).
  
To display text, the game uses bitmap fonts, so if your language has new characters that it doesn't support, you'll have to add them in yourself. The font files are ''Big.fnt'' and ''Small.fnt'', which are referenced by a ''Font.dat'' text file which contains all the characters in the fonts (in UTF-8). To add a character you just put it at the end of ''Font.dat'' and then draw them into the font files (both lowercase and uppercase).
+
== Format ==
  
In addition, the Geoscape sidebar doesn't use fonts, but is a hardcoded graphic with all the text drawn onto the buttons. Just copy one of the existing sidebars (the *.geo files next to the languages) and edit it to fit your strings.
+
Language files are stored in YAML format (UTF-8). Here's a typical language file:
  
== Current Translations ==
+
<pre>
 +
en-US:
 +
  STR_AVENGER_UFOPEDIA: "TRANSPORTER AND COMBAT SPACECRAFT.  THE ULTIMATE REPLICATION OF ALIEN TECHNOLOGY."
 +
  STR_INTERCEPTOR_UFOPEDIA: "COMBAT AIRCRAFT WITH DUAL PULSE DETONATION ENGINES AND SPECIALLY SHIELDED ELECTRONIC SYSTEMS.  THE BEST AVAILABLE EARTH BASED TECHNOLOGY."
 +
  STR_LIGHTNING_UFOPEDIA: "TRANSPORTER AND COMBAT CRAFT.  A CRUDE BUT EFFECTIVE REPLICATION OF ALIEN PROPULSION SYSTEMS."
 +
  STR_SKYRANGER_UFOPEDIA: "TROOP TRANSPORTER.  THE FASTEST OF ITS KIND, WITH VERTICAL TAKE OFF AND LANDING (V.T.O.L.) CAPABILITY."
 +
  STR_FIRESTORM_UFOPEDIA: "COMBAT CRAFT.  THIS ONE-MAN FIGHTER REPLICATES THE CLASSIC ALIEN FLYING SAUCER DESIGN, WITH CENTRAL PROPULSION UNIT."
 +
  ...
 +
</pre>
  
{| class="wikitable"
+
The first line contains the [http://www.i18nguy.com/unicode/language-identifiers.html IETF language tag] (same as the filename). The rest of the text are just key-string pairs, separated by linebreaks. Language files are placed in the ''Data\Language'' folder and have the .yml extension.
|-
 
! Name
 
| Thread
 
! Status
 
|-
 
| Bulgarian
 
| [http://openxcom.org/forum/index.php/topic,804.0.html Thread]
 
| Work in progress
 
|-
 
| Chinese (Traditional)
 
| [http://openxcom.org/forum/index.php/topic,155.0.html Thread]
 
| Work in progress
 
|-
 
| Czech
 
| [http://openxcom.org/forum/index.php/topic,153.0.html Thread]
 
| Incomplete
 
|-
 
| Danish
 
| [http://openxcom.org/forum/index.php/topic,158.0.html Thread]
 
| Work in progress
 
|-
 
| Dutch
 
| [http://openxcom.org/forum/index.php/topic,274.0.html Thread]
 
| Work in progress
 
|-
 
| English (UK/US)
 
| N/A
 
| Base language
 
|-
 
| French
 
| [http://openxcom.org/forum/index.php/topic,371.0.html Thread]
 
| Up-to-date
 
|-
 
| German
 
| [http://openxcom.org/forum/index.php/topic,676.0.html Thread]
 
| Up-to-date
 
|-
 
| Hungarian
 
| [http://openxcom.org/forum/index.php/topic,639.0.html Thread]
 
| Up-to-date
 
|-
 
| Italian
 
| [http://openxcom.org/forum/index.php/topic,675.0.html Thread]
 
| Up-to-date
 
|-
 
| Japanese
 
| [http://openxcom.org/forum/index.php/topic,199.0.html Thread]
 
| Work in progress
 
|-
 
| Polish
 
| [http://openxcom.org/forum/index.php/topic,159.0.html Thread]
 
| Up-to-date
 
|-
 
| Portuguese (PT)
 
| [http://openxcom.org/forum/index.php/topic,163.0.html Thread]
 
| Up-to-date
 
|-
 
| Romanian
 
| [http://openxcom.org/forum/index.php/topic,157.0.html Thread]
 
| Up-to-date
 
|-
 
| Russian
 
| [http://openxcom.org/forum/index.php/topic,161.0.html Thread]
 
| Up-to-date
 
|-
 
| Spanish (ES)
 
| [http://openxcom.org/forum/index.php/topic,685.0.html Thread]
 
| Up-to-date
 
|-
 
| Spanish (AL)
 
| [http://openxcom.org/forum/index.php/topic,1163.0.html Thread]
 
| Up-to-date
 
|-
 
| Ukrainian
 
| [http://openxcom.org/forum/index.php/topic,154.0.html Thread]
 
| Up-to-date
 
|}
 
  
 
== External Links ==
 
== External Links ==
  
 
* [http://openxcom.org/forum/index.php/board,6.0.html Translations forum]
 
* [http://openxcom.org/forum/index.php/board,6.0.html Translations forum]
* [https://github.com/SupSuper/OpenXcom/tree/master/bin/data/Language Latest Translations in Github]
 
  
 
[[Category:OpenXcom]]
 
[[Category:OpenXcom]]

Revision as of 17:14, 28 September 2013

Like the original, OpenXcom supports translation of all ingame strings. However, the format has been changed to make it easier to edit, maintain and add support for Unicode. Currently the easiest way to translate is to use the online tool.

Guidelines

  • Don't add linebreaks: The game automatically word-wraps text, and any explicit linebreaks are marked with {NEWLINE} and {SMALLLINE}.
  • Preserve the original structure: Don't change text inside {} tags and keep any spaces, uppercases, etc. that the original string has, don't go trimming and cleaning up for no good reason.
  • Be consistent: Don't make the text look schizophrenic, stick to one style throughout. If a word has multiple translations, choose one and stick with it. If working with multiple translators, be sure to work this out before-hand.
  • Don't use an automatic translator: We're not robots.
  • Review your work: Again, we're not robots and make mistakes every now and then. Don't forget to use a spellchecker.
  • Pay attention to length: while most of the interface is fairly roomy (eg. Ufopaedia screens), some elements just can't fit a lot of words into a tight 320x200 screen (eg. columned lists). Remember you can test your translation ingame by downloading the file to your Language folder.

Graphics

Sadly a translator's job isn't just replacing strings. Sometimes you also need to have a little bit of artistry. The game uses bitmap fonts to display text, so if your language has new characters that it doesn't support, you'll have to add them in yourself. The font files are PNG images in the Llanguage folder, which are referenced by a Font.dat text file which contains all the characters in the fonts (in UTF-8). To add a character you just put it at the end of the chars: in Font.dat and then draw them into the font files (both lowercase and uppercase).

Format

Language files are stored in YAML format (UTF-8). Here's a typical language file:

en-US:
  STR_AVENGER_UFOPEDIA: "TRANSPORTER AND COMBAT SPACECRAFT.  THE ULTIMATE REPLICATION OF ALIEN TECHNOLOGY."
  STR_INTERCEPTOR_UFOPEDIA: "COMBAT AIRCRAFT WITH DUAL PULSE DETONATION ENGINES AND SPECIALLY SHIELDED ELECTRONIC SYSTEMS.  THE BEST AVAILABLE EARTH BASED TECHNOLOGY."
  STR_LIGHTNING_UFOPEDIA: "TRANSPORTER AND COMBAT CRAFT.  A CRUDE BUT EFFECTIVE REPLICATION OF ALIEN PROPULSION SYSTEMS."
  STR_SKYRANGER_UFOPEDIA: "TROOP TRANSPORTER.  THE FASTEST OF ITS KIND, WITH VERTICAL TAKE OFF AND LANDING (V.T.O.L.) CAPABILITY."
  STR_FIRESTORM_UFOPEDIA: "COMBAT CRAFT.  THIS ONE-MAN FIGHTER REPLICATES THE CLASSIC ALIEN FLYING SAUCER DESIGN, WITH CENTRAL PROPULSION UNIT."
  ...

The first line contains the IETF language tag (same as the filename). The rest of the text are just key-string pairs, separated by linebreaks. Language files are placed in the Data\Language folder and have the .yml extension.

External Links