- Translating Xinha
Hello you multi-lingual person you, so you would like to help translate Xinha or create your own special translation to use?
It’s really easy!
First, Download Xinha
In the full Xinha distribution (Download Xinha Here) you will find some files under the following directory
you can see that there is a file for every currently existing translation there and also one called “new.js”. You will also see there are other lang files around the place, they are used only when not using a merged file, you don’t need to touch them, just work on /lang/merged/*.js !
Edit or Create the Language File
If your language is there already, simply open that .js file in your favourite UTF-8 compliant text editor.
If your language is not there, copy the new.js file and create a new one called [yourlanguagecode].js, for example if you are translating into Klingon, perhaps “kl.js” and then open it in your favourite UTF-8 compliant text editor.
Please note that all translation is in UTF-8 Encoding, do not try to use other character encodings (character sets), it’s not going to end well.
Test The Language File
To actually test or use your translation, in your code right before you load Xinha specify the language and file like this…
that’s it, try out Xinha and your language file should provide the translations.
When you have made your translation file and would like to submit it to Xinha for inclusion in a future distibution of Xinha, please just open a ticket at http://trac.xinha.org/ and attach your new or improved language file, be sure to let us know your details to add the the contributors list below!
In the contrib directory there are a few scripts written in PHP to handle the translation setup tasks.
lc_base.js files do not get committed to the Subversion repository they are just temporary working files.
This script takes all the lc_base.js files and the existing lang files for a given language and creates a merged language file, for example
php contrib/lc_create_merged_file.php fr /tmp/fr.js
creates the French translation merged file /tmp/fr.js
Note that existing merged files are not consulted during this process.
Translators can then work on the merged file to do their translation work.
To make things easy the
lang/merged/ directory contains pre-generated merged
language files of each language of the release, again these are not committed
to the subversion repository.
If you run this script without arguments it will give you some help showing how you can generate all the merged language files at once, this is done as part of the release process.
This script takes a merged file and splits it into the constituent lang files these files are written into a temporary directory structure so that you can use a diff/merge tool if you wish to compare them rather than actually copying them into place. For example,
php contrib/lc_split_merged_file.php /tmp/fr.js fr
will create a directory structure (it will be printed at completion) in /tmp,
/tmp/something-unique-here/lang/fr.js /tmp/something-unique-here/modules/…/lang/fr.js /tmp/something-unique-here/plugins/…/lang/fr.js /tmp/something-unique-here/unsupported_plugins/…/lang/fr.js
the directory and some instructions for easily “installing” the generated files is printed.
The following people are thanked for providing and updating translations!
- ch: Samuel Stone, http://stonemicro.com/
- cz: Jiri Löw, firstname.lastname@example.org
- da: Bjarke M. Lauridsen, http://www.detailx.dk, email@example.com
- da: rene, firstname.lastname@example.org
- da: Steen Sønderup, email@example.com
- de: Broxx, firstname.lastname@example.org
- de: Holger Hees, email@example.com, http://www.systemconcept.de
- de: Mihai Bazon, http://dynarch.com/mishoo
- de: Raimund Meyer firstname.lastname@example.org
- de: sven schomacker, http://www.hilope.de, email@example.com
- de: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, firstname.lastname@example.org
- ee: Martin Raie, email@example.com
- el: Dimitris Glezos, firstname.lastname@example.org
- es: Derick Leony email@example.com
- es: michael Hauptmnn (mhauptma73) , http://www.azahost.com/, firstname.lastname@example.org
- eu: Unkown
- fa: Unknown
- fi: Unknown
- fr: Kevin Huppert - Créabilis, http://www.creabilis.com, email@example.com
- he: Liron Newman, http://www.eesh.net,
- he: Mihai Bazon, http://dynarch.com/mishoo
- hu: Miklós Somogyi, firstname.lastname@example.org
- it: Fabio Rotondo email@example.com
- it: Mattia Landoni, http://www.webpresident.org/
- it: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, firstname.lastname@example.org
- ja: Unknown
- lt: Jaroslav Šatkevič, email@example.com
- lv: Mihai Bazon, http://dynarch.com/mishoo
- nb: Kim Steinhaug, http://www.steinhaug.com/, http://www.easycms.no/, firstname.lastname@example.org
- nb: Mihai Bazon, email@example.com
- nb: Håvard Wigtil firstname.lastname@example.org
- nb: email@example.com
- nl: A.H van den Broek http://www.kontaktfm.nl, firstname.lastname@example.org
- nl: Arthur Bogaart email@example.com
- nl: Holger Hees, firstname.lastname@example.org
- nl: Maarten Molenschot, email@example.com
- nl: Michel Weegeerink (firstname.lastname@example.org), http://mmc-shop.nl
- nl: Mihai Bazon, http://dynarch.com/mishoo
- nl: Raimund Meyer email@example.com
- nl: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, firstname.lastname@example.org
- pl: Krzysztof Kotowicz, http://www.web.eskot.pl, http://www.eskot.krakow.pl/portfolio/, email@example.com, firstname.lastname@example.org
- pt_br: Cau guanabara (independent developer), email@example.com
- pt_br: Marcio Barbosa, firstname.lastname@example.org, http://www.mpg.com.br/
- ro: Mihai Bazon, http://dynarch.com/mishoo
- ru: Andrei Blagorazumov, email@example.com
- ru: Helen Mitkina (zerok)
- ru: Yulya Shtyryakova, firstname.lastname@example.org
- sh: Ljuba Ranković, http://www.rankovic.net/ljubar
- si: Tomaz Kregar, email@example.com
- sr: Ljuba Ranković, http://www.rankovic.net/ljubar
- sv: Erik Dalén, firstname.lastname@example.org
- th: Suchin Prasongbundit, email@example.com
- tr: Serdar Domurcuk, firstname.lastname@example.org, http://www.km.co.at/
- vn: Nguyễn Đình Nam, email@example.com
- zh_cn: Dave Lo, firstname.lastname@example.org
- b5: Dave Lo, email@example.com