1 | Translating Xinha |
---|
2 | ################################################################################ |
---|
3 | |
---|
4 | Hello you multi-lingual person you, so you would like to help translate Xinha |
---|
5 | or create your own special translation to use? |
---|
6 | |
---|
7 | It's really easy! |
---|
8 | |
---|
9 | In the Xinha distribution you will find some files under the following directory |
---|
10 | |
---|
11 | /lang/merged/*.js |
---|
12 | |
---|
13 | you can see that there is a file for every currently existing translation there |
---|
14 | and also one called "__new__.js". You will also see there are other lang files |
---|
15 | around the place, they are used only when not using a merged file, you don't need |
---|
16 | to touch them, just work on /lang/merged/*.js ! |
---|
17 | |
---|
18 | If your language is there already, simply open that .js file in your favourite |
---|
19 | UTF-8 compliant text editor. |
---|
20 | |
---|
21 | If your language is not there, copy the __new__.js file and create a new one called |
---|
22 | [yourlanguagecode].js, for example if you are translating into Klingon, perhaps |
---|
23 | "kl.js" and then open it in your favourite UTF-8 compliant text editor. |
---|
24 | |
---|
25 | Please note that all translation is in UTF-8 Encoding, do not try to use other |
---|
26 | character encodings (character sets), it's not going to end well. |
---|
27 | |
---|
28 | To actually test or use your translation, in your code right before you load |
---|
29 | Xinha specify the language and file like this... |
---|
30 | |
---|
31 | <!-- Set Language To Klingon --> |
---|
32 | <script type="text/javascript> |
---|
33 | _editor_lang = 'kl'; |
---|
34 | _editor_lang_merged_file = '/xinha/lang/merged/kl.js'; |
---|
35 | </script> |
---|
36 | |
---|
37 | <!-- And Load Xinha As Usual --> |
---|
38 | <script type="text/javascript" src="../XinhaCore.js"></script> |
---|
39 | |
---|
40 | that's it, try out Xinha and your language file should provide the translations. |
---|
41 | |
---|
42 | When you have made your translation file and would like to submit it |
---|
43 | to Xinha for inclusion in a future distibution of Xinha, please just open a |
---|
44 | ticket at http://trac.xinha.org/ and attach your new or improved language file, |
---|
45 | be sure to let us know your details to add the the contributors list below! |
---|
46 | |
---|
47 | Tools |
---|
48 | ################################################################################ |
---|
49 | |
---|
50 | In the contrib directory there are a few scripts written in PHP to handle the |
---|
51 | translation setup tasks. |
---|
52 | |
---|
53 | lc_parse_strings.php |
---|
54 | -------------------------------------------------------------------------------- |
---|
55 | |
---|
56 | This script goes through all the Xinha files, javascript, php, html, and pulls |
---|
57 | out the strings which should get translated. These are written into lc_base.js |
---|
58 | translation files spread through the system, eg /lang/lc_base.js, |
---|
59 | /modules/.../lang/lc_base.js, /plugins/.../lang/lc_base.js and so forth. |
---|
60 | |
---|
61 | lc_base.js files do not get committed to the Subversion repository they are |
---|
62 | just temporary working files. |
---|
63 | |
---|
64 | lc_create_merged_file.php |
---|
65 | -------------------------------------------------------------------------------- |
---|
66 | |
---|
67 | This script takes all the lc_base.js files and the existing lang files for a given |
---|
68 | language and creates a merged language file, for example |
---|
69 | |
---|
70 | php contrib/lc_create_merged_file.php fr /tmp/fr.js |
---|
71 | |
---|
72 | creates the French translation merged file /tmp/fr.js |
---|
73 | |
---|
74 | Note that existing merged files are not consulted during this process. |
---|
75 | |
---|
76 | Translators can then work on the merged file to do their translation work. |
---|
77 | |
---|
78 | To make things easy the `lang/merged/` directory contains pre-generated merged |
---|
79 | language files of each language of the release, again these are not committed |
---|
80 | to the subversion repository. |
---|
81 | |
---|
82 | If you run this script without arguments it will give you some help showing how |
---|
83 | you can generate all the merged language files at once, this is done as part of |
---|
84 | the release process. |
---|
85 | |
---|
86 | lc_split_merged_file.php |
---|
87 | -------------------------------------------------------------------------------- |
---|
88 | |
---|
89 | This script takes a merged file and splits it into the constituent lang files |
---|
90 | these files are written into a temporary directory structure so that you can |
---|
91 | use a diff/merge tool if you wish to compare them rather than actually copying |
---|
92 | them into place. For example, |
---|
93 | |
---|
94 | php contrib/lc_split_merged_file.php /tmp/fr.js fr |
---|
95 | |
---|
96 | will create a directory structure (it will be printed at completion) in /tmp, |
---|
97 | |
---|
98 | /tmp/something-unique-here/lang/fr.js |
---|
99 | /tmp/something-unique-here/modules/.../lang/fr.js |
---|
100 | /tmp/something-unique-here/plugins/.../lang/fr.js |
---|
101 | /tmp/something-unique-here/unsupported_plugins/.../lang/fr.js |
---|
102 | |
---|
103 | the directory and some instructions for easily "installing" the generated files |
---|
104 | is printed. |
---|
105 | |
---|
106 | Contributors |
---|
107 | ################################################################################ |
---|
108 | |
---|
109 | The following people are thanked for providing and updating translations! |
---|
110 | |
---|
111 | ch: Samuel Stone, http://stonemicro.com/ |
---|
112 | cz: Jiri Löw, <jirilow@jirilow.com> |
---|
113 | da: Bjarke M. Lauridsen, http://www.detailx.dk, detailx@gmail.com |
---|
114 | da: rene, <rene@laerke.net> |
---|
115 | da: Steen SÞnderup, <steen@soenderup.com> |
---|
116 | de: Broxx, <broxx@broxx.com> |
---|
117 | de: Holger Hees, <hhees@systemconcept.de>, http://www.systemconcept.de |
---|
118 | de: Mihai Bazon, http://dynarch.com/mishoo |
---|
119 | de: Raimund Meyer xinha@ray-of-light.org |
---|
120 | de: sven schomacker, http://www.hilope.de, mail@hilope.de |
---|
121 | de: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, udo.schmal@t-online.de |
---|
122 | ee: Martin Raie, <albertvill@hot.ee> |
---|
123 | el: Dimitris Glezos, dimitris@glezos.com |
---|
124 | es: Derick Leony <dleony@gmail.com> |
---|
125 | es: michael Hauptmnn (mhauptma73) , http://www.azahost.com/, miguel@azalorea.com |
---|
126 | eu: Unkown |
---|
127 | fa: Unknown |
---|
128 | fi: Unknown |
---|
129 | fr: Kevin Huppert - Créabilis, http://www.creabilis.com, kevin.huppert@worldonline.fr |
---|
130 | he: Liron Newman, http://www.eesh.net, <plastish at ultinet dot org> |
---|
131 | he: Mihai Bazon, http://dynarch.com/mishoo |
---|
132 | hu: Miklós Somogyi, <somogyine@vnet.hu> |
---|
133 | it: Fabio Rotondo <fabio@rotondo.it> |
---|
134 | it: Mattia Landoni, http://www.webpresident.org/ |
---|
135 | it: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, udo.schmal@t-online.de |
---|
136 | ja: Unknown |
---|
137 | lt: Jaroslav Å atkeviÄ, <jaro@akl.lt> |
---|
138 | lv: Mihai Bazon, http://dynarch.com/mishoo |
---|
139 | nb: Kim Steinhaug, http://www.steinhaug.com/, http://www.easycms.no/, kim@easycms.no |
---|
140 | nb: Mihai Bazon, <mihai_bazon@yahoo.com> |
---|
141 | nb: HÃ¥vard Wigtil <havardw@extend.no> |
---|
142 | nb: ses<ses@online.no> |
---|
143 | nl: A.H van den Broek http://www.kontaktfm.nl, tonbroek@kontaktfm.nl |
---|
144 | nl: Arthur Bogaart a.bogaart@onehippo.org |
---|
145 | nl: Holger Hees, <hhees@systemconcept.de> |
---|
146 | nl: Maarten Molenschot, maarten@nrgmm.nl |
---|
147 | nl: Michel Weegeerink (info@mmc-shop.nl), http://mmc-shop.nl |
---|
148 | nl: Mihai Bazon, http://dynarch.com/mishoo |
---|
149 | nl: Raimund Meyer xinha@ray-of-light.org |
---|
150 | nl: Udo Schmal (gocher), http://www.schaffrath-neuemedien.de/, udo.schmal@t-online.de |
---|
151 | pl: Krzysztof Kotowicz, http://www.web.eskot.pl, http://www.eskot.krakow.pl/portfolio/, koto@webworkers.pl, koto1sa@o2.pl |
---|
152 | pt_br: Cau guanabara (independent developer), caugb@ibest.com.br |
---|
153 | pt_br: Marcio Barbosa, <marcio@mpg.com.br>, http://www.mpg.com.br/ |
---|
154 | ro: Mihai Bazon, http://dynarch.com/mishoo |
---|
155 | ru: Andrei Blagorazumov, a@fnr.ru |
---|
156 | ru: Helen Mitkina (zerok) <e.mitkina at gmail> |
---|
157 | ru: Yulya Shtyryakova, <yulya@vdcom.ru> |
---|
158 | sh: Ljuba RankoviÄ, http://www.rankovic.net/ljubar |
---|
159 | si: Tomaz Kregar, x_tomo_x@email.si |
---|
160 | sr: Ljuba RankoviÄ, http://www.rankovic.net/ljubar |
---|
161 | sv: Erik Dalén, <dalen@jpl.se> |
---|
162 | th: Suchin Prasongbundit, <suchin@joolsoft.com> |
---|
163 | tr: Serdar Domurcuk, <serdar.domurcuk@km.co.at>, http://www.km.co.at/ |
---|
164 | vn: Nguyá»
n Äình Nam, <hncryptologist@yahoo.com> |
---|
165 | zh_cn: Dave Lo, dlo@interactivetools.com |
---|
166 | b5: Dave Lo, dlo@interactivetools.com |
---|