Howto:Translate FlightGear: Difference between revisions
m (create howto translate flightgear) |
m (→Introduction) |
||
Line 6: | Line 6: | ||
http://www.mail-archive.com/flightgear-users@lists.sourceforge.net/msg05761.html | http://www.mail-archive.com/flightgear-users@lists.sourceforge.net/msg05761.html | ||
WARNING : | |||
You can only use ASCII characters for translating strings in your language. | You can only use ASCII characters for translating strings in your language. | ||
== The How to == | |||
1) You need to have flightgear installed on your computer | |||
For example : Flightgear on Windows is in the directory : | |||
C:\Program Files\FlightGear-1.0.0 | |||
Strings to translate are between the XML tags <label> and <legend>. | |||
2) You need to translate the english strings in the xml file C:\Program Files\FlightGear-1.0.0\data\gui\menubar.xml | |||
For exemple, in the file menubar.xml, | |||
the english text string <label>Save</label> | |||
will become <label>Sauvegarder</label> in french | |||
3) You need to translate the english strings in the xml files that are in | |||
the directory C:\Program Files\FlightGear-1.0.0\data\gui\dialogs | |||
4a)Create a copy of the file C:\Program Files\FlightGear-1.0.0\data\Translations\strings-default.xml in the directory C:\Program Files\FlightGear-1.0.0\data\Translations | |||
4b)Rename the copy of the file strings-default.xml with a new name like strings-language_code.xml where language_code is the international code for your language. | |||
For example , fr for french or de for german. | |||
5)Translate all the english text strings in your strings-language_code.xml file in your language. | |||
6) Edit the file C:\Program Files\FlightGear-1.0.0\data\Translations\locale.xml | |||
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> |
Revision as of 22:17, 2 January 2008
Introduction
This is a howto that explain how to translate FlightGear's menus and message in your language.
Flightgear have a bad I18N (internationalization) support. More information here : http://www.mail-archive.com/flightgear-users@lists.sourceforge.net/msg05761.html
WARNING : You can only use ASCII characters for translating strings in your language.
The How to
1) You need to have flightgear installed on your computer For example : Flightgear on Windows is in the directory : C:\Program Files\FlightGear-1.0.0
Strings to translate are between the XML tags <label> and <legend>.
2) You need to translate the english strings in the xml file C:\Program Files\FlightGear-1.0.0\data\gui\menubar.xml For exemple, in the file menubar.xml, the english text string <label>Save</label> will become <label>Sauvegarder</label> in french
3) You need to translate the english strings in the xml files that are in the directory C:\Program Files\FlightGear-1.0.0\data\gui\dialogs
4a)Create a copy of the file C:\Program Files\FlightGear-1.0.0\data\Translations\strings-default.xml in the directory C:\Program Files\FlightGear-1.0.0\data\Translations
4b)Rename the copy of the file strings-default.xml with a new name like strings-language_code.xml where language_code is the international code for your language. For example , fr for french or de for german.
5)Translate all the english text strings in your strings-language_code.xml file in your language.
6) Edit the file C:\Program Files\FlightGear-1.0.0\data\Translations\locale.xml 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>