Difference between revisions of "Translations (OpenXcom)"

From UFOpaedia
Jump to navigation Jump to search
m
Line 31: Line 31:
 
* 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 anytime.
 +
 +
== 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].
 +
 +
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).
 +
 +
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.
  
 
== Current Translations ==
 
== Current Translations ==
Line 102: Line 110:
 
| Spanish (ES)
 
| Spanish (ES)
 
| [http://openxcom.org/forum/index.php/topic,685.0.html Thread]
 
| [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
 
| Up-to-date
 
|-
 
|-

Revision as of 00:35, 7 May 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. They are stored in the Data\Language folder.

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 Notepad++ for Windows users). Here's a typical language file:

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.
...

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

  • 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.
  • 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 anytime.

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 here.

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).

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.

Current Translations

Name Thread Status
Bulgarian Thread Work in progress
Chinese (Traditional) Thread Work in progress
Czech Thread Incomplete
Danish Thread Work in progress
Dutch Thread Work in progress
English (UK/US) N/A Base language
French Thread Up-to-date
German Thread Up-to-date
Hungarian Thread Up-to-date
Italian Thread Up-to-date
Japanese Thread Work in progress
Polish Thread Up-to-date
Portuguese (PT) Thread Up-to-date
Romanian Thread Up-to-date
Russian Thread Up-to-date
Spanish (ES) Thread Up-to-date
Spanish (AL) Thread Up-to-date
Ukrainian Thread Up-to-date