Howto:Translate FlightGear: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Switched to the {{repo link}} templates for all the FGData URLs.)
m (URL capitalisation fix.)
Line 1: Line 1:
How to '''translate [[FlightGear]]''''s menus and messages to your language.
How to '''translate [[FlightGear]]''''s menus and messages to your language.


# Check whether your language already has a subdirectory below {{fg root file|translations}}. Also check the master repository [{{fgdata url|path=Translations}}] - maybe someone has just recently created the language resources. If so, please download the files from the repository, as the ones on your system might be outdated.
# Check whether your language already has a subdirectory below {{fg root file|Translations}}. Also check the master repository [{{fgdata url|path=Translations}}] - maybe someone has just recently created the language resources. If so, please download the files from the repository, as the ones on your system might be outdated.
#* The two letter language code can be obtained from the [http://www.loc.gov/standards/iso639-2/php/code_list.php ISO 639 list]. If it does exist, skip to step 2, else do the following:
#* The two letter language code can be obtained from the [http://www.loc.gov/standards/iso639-2/php/code_list.php ISO 639 list]. If it does exist, skip to step 2, else do the following:
## Create an empty directory with your language's code.
## Create an empty directory with your language's code.

Revision as of 09:30, 9 March 2017

How to translate FlightGear's menus and messages to your language.

  1. Check whether your language already has a subdirectory below $FG_ROOT/Translations. Also check the master repository [1] - maybe someone has just recently created the language resources. If so, please download the files from the repository, as the ones on your system might be outdated.
    • The two letter language code can be obtained from the ISO 639 list. If it does exist, skip to step 2, else do the following:
    1. Create an empty directory with your language's code.
    2. Download the latest English language resources from flightgear/fgdata/next/Translations/en.
    3. Copy all the downloaded files to the directory of your language (e.g. "menu.xml" and "options.xml").
  2. Translate the English strings in your language's xml files.
    • Do not translate the filenames!
    • Please do not change the order, structure or indentation of the XML files - only translate the English text content itself. This helps with future maintenance when the language resource need to be updated for another FG version, since the files can more easily be compared with the default English resource.
  3. Edit the file $FG_ROOT/Translations/locale.xml and add the section for your language if it's not already there.
  4. Start FlightGear
    • FlightGear selects the language resource based on your computer's main language setting (operations system's locale).
    • When FlightGear does not select your preferred language automatically (i.e. you have configured your machine to another language), you can explicitly select a language using the command-line switch --language=<language code>, or, when starting via FGRun, select the language at Advanced > General.

Supported Versions

Menu translations are only supported as of FG 2.7.0 and later.

Supported Character Sets

Currently, FlightGear has very limited character set support. Only plain ASCII characters and its Latin1/ISO-8859-1 extension are supported - which covers Western European languages only (Portuguese to German, Italian to Norwegian).

However, FlightGear's GUI is currently being reworked (PLIB is ported to OSG). Once the work is complete, it should be possible to support arbitrary fonts and languages - so even Russian, Japanese, Chinese, ... fonts will be supported.

Related content