|
|
Line 1: |
Line 1: |
| ===<font color="red">This feature appears to be broken with recent versions of FlightGear.</font>===
| | This howto explains '''translating [[FlightGear]]''''s menus and messages to your language. |
|
| |
|
| This howto explains translating [[FlightGear]]'s menus and messages to your language.
| | The language option was broken in FlightGear 2.4.0 and 2.6.0. Menu translations are only supported as of 2.7.0 and later. |
|
| |
|
| Flightgear has bad I18N (internationalization) support. More information at: http://www.mail-archive.com/flightgear-users@lists.sourceforge.net/msg05761.html
| | # Check whether your language already has a subdirectory under <tt>[[$FG_ROOT]]/translations/</tt>. 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. |
| | ## Copy the <tt>[[$FG_ROOT]]/translations/en/menu.xml</tt> and <tt>[[$FG_ROOT]]/translations/en/options.xml</tt> file to the directory of your language. |
| | # Translate the English strings in your language's xml files. '''Do not''' translate the filenames! |
| | # Edit the file <tt>[[$FG_ROOT]]/Translations/locale.xml</tt> and add the section for your language. |
| | # Start FlightGear with <code>--lang=your code</code> (can be set via <tt>Advanced > General</tt>, when using [[FGRun]]). |
|
| |
|
| '''WARNING:''' You can only use [http://en.wikipedia.org/w/index.php?title=American_Standard_Code_for_Information_Interchange§ion=5#ASCII_printable_characters ASCII] characters for translating strings in your language. | | === Notes === |
| | | * '''WARNING:''' You can only use [http://en.wikipedia.org/w/index.php?title=American_Standard_Code_for_Information_Interchange§ion=5#ASCII_printable_characters ASCII] characters for translating strings in your language. |
| == The How to ==
| | * FlightGear has bad I18N (internationalization) support. More information at: http://www.mail-archive.com/flightgear-users@lists.sourceforge.net/msg05761.html |
| # You need to have FlightGear installed on your computer of course. For example: FlightGear on Windows is in the directory: <tt>C:\Program Files\FlightGear-1.0.0</tt>. Strings to translate are between the XML tags <label> and <legend>.
| |
| # You need to translate the english strings in the xml file <tt>C:\Program Files\FlightGear-1.0.0\data\gui\menubar.xml</tt>. For example, in the file <tt>menubar.xml</tt>, the english text string <tt><label>Save</label></tt> will become <tt><label>Sauvegarder</label></tt> in French.
| |
| # You need to translate the english strings in the xml files that are in the directory <tt>C:\Program Files\FlightGear-1.0.0\data\gui\dialogs</tt>
| |
| #* Create a copy of the file <tt>C:\Program Files\FlightGear-1.0.0\data\Translations\strings-default.xml</tt> in the directory <tt>C:\Program Files\FlightGear-1.0.0\data\Translations</tt>.
| |
| #* Rename the copy of the file <tt>strings-default.xml</tt> with a new name like <tt>strings-language_code.xml</tt> where <tt>language_code</tt> is the international code for your language. For example, fr for french or de for German.
| |
| # Translate all the English text strings in your strings-language_code.xml file in your language.
| |
| # Edit the file <tt>C:\Program Files\FlightGear-1.0.0\data\Translations\locale.xml</tt> and add the section for your language:
| |
| | |
| <locale>
| |
| <lang type="string">language_code</lang>
| |
| <lang type="string">language_code.character_set</lang>
| |
| <strings>Translations/strings-language_code.xml</strings>
| |
| </locale>
| |
| | |
| For example, in german, you have this :
| |
| <locale>
| |
| <lang type="string">de</lang>
| |
| <lang type="string">de_AT</lang>
| |
| <lang type="string">de_CH</lang>
| |
| <lang type="string">de_AT.ISO8859-15</lang>
| |
| <lang type="string">de_DE.ISO8859-15</lang>
| |
| <lang type="string">de_CH.ISO8859-15</lang>
| |
| <strings>Translations/strings-de.xml</strings>
| |
| </locale>
| |
|
| |
|
| == Related content == | | == Related content == |