- 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, email@example.com
- da: Bjarke M. Lauridsen, http://www.detailx.dk, firstname.lastname@example.org
- da: rene, email@example.com
- da: Steen Sønderup, firstname.lastname@example.org
- de: Broxx, email@example.com
- de: Holger Hees, firstname.lastname@example.org, http://www.systemconcept.de
- de: Mihai Bazon, http://dynarch.com/mishoo
- de: Raimund Meyer email@example.com
- de: sven schomacker, http://www.hilope.de, firstname.lastname@example.org
- de: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, email@example.com
- ee: Martin Raie, firstname.lastname@example.org
- el: Dimitris Glezos, email@example.com
- es: Derick Leony firstname.lastname@example.org
- es: michael Hauptmnn (mhauptma73) , http://www.azahost.com/, email@example.com
- eu: Unkown
- fa: Unknown
- fi: Unknown
- fr: Kevin Huppert - Créabilis, http://www.creabilis.com, firstname.lastname@example.org
- he: Liron Newman, http://www.eesh.net,
- he: Mihai Bazon, http://dynarch.com/mishoo
- hu: Miklós Somogyi, email@example.com
- it: Fabio Rotondo firstname.lastname@example.org
- it: Mattia Landoni, http://www.webpresident.org/
- it: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, email@example.com
- ja: Unknown
- lt: Jaroslav Šatkevič, firstname.lastname@example.org
- lv: Mihai Bazon, http://dynarch.com/mishoo
- nb: Kim Steinhaug, http://www.steinhaug.com/, http://www.easycms.no/, email@example.com
- nb: Mihai Bazon, firstname.lastname@example.org
- nb: Håvard Wigtil email@example.com
- nb: firstname.lastname@example.org
- nl: A.H van den Broek http://www.kontaktfm.nl, email@example.com
- nl: Arthur Bogaart firstname.lastname@example.org
- nl: Holger Hees, email@example.com
- nl: Maarten Molenschot, firstname.lastname@example.org
- nl: Michel Weegeerink (email@example.com), http://mmc-shop.nl
- nl: Mihai Bazon, http://dynarch.com/mishoo
- nl: Raimund Meyer firstname.lastname@example.org
- nl: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, email@example.com
- pl: Krzysztof Kotowicz, http://www.web.eskot.pl, http://www.eskot.krakow.pl/portfolio/, firstname.lastname@example.org, email@example.com
- pt_br: Cau guanabara (independent developer), firstname.lastname@example.org
- pt_br: Marcio Barbosa, email@example.com, http://www.mpg.com.br/
- ro: Mihai Bazon, http://dynarch.com/mishoo
- ru: Andrei Blagorazumov, firstname.lastname@example.org
- ru: Helen Mitkina (zerok)
- ru: Yulya Shtyryakova, email@example.com
- sh: Ljuba Ranković, http://www.rankovic.net/ljubar
- si: Tomaz Kregar, firstname.lastname@example.org
- sr: Ljuba Ranković, http://www.rankovic.net/ljubar
- sv: Erik Dalén, email@example.com
- th: Suchin Prasongbundit, firstname.lastname@example.org
- tr: Serdar Domurcuk, email@example.com, http://www.km.co.at/
- vn: Nguyễn Đình Nam, firstname.lastname@example.org
- zh_cn: Dave Lo, email@example.com
- b5: Dave Lo, firstname.lastname@example.org