293c6b5162b948b42f922e87f835c2abdb701226
[squirrelmail.git] / doc / i18n.txt
1 SquirrelMail internationalization
2
3 This document should explain how SquirrelMail internationalization works and
4 provide information about some aspects of implementation.
5
6 1. Supported languages
7 2. $languages array
8 3. XTRA_CODE functions
9 4. Display of different charsets
10 5. IMAP folder names
11
12 -------------------------------
13 1. Supported languages
14 -------------------------------
15 Valid language codes are:
16 * ar - Arabic, windows-1256 charset
17 * bg_BG - Bulgarian, windows-1251 charset
18 * ca_ES - Catalan, iso-8859-1 charset
19 * cs_CZ - Czech, iso-8859-2 charset
20 * cy_GB - Welsh, iso-8859-1 charset
21 * da_DK - Danish, iso-8859-1 charset
22 * de_DE - German, iso-8859-1 charset
23 * el_GR - Greek, iso-8859-7 charset
24 * en_GB - British, iso-8859-15 charset
25 * en_US - English, charset depends on $default_charset
26 * es_ES - Spanish, iso-8859-1 charset
27 * et_EE - Estonian, iso-8859-15 charset
28 * eu_ES - Basque, iso-8859-1 charset
29 * fa_IR - Farsi, utf-8 charset
30 * fi_FI - Finnish, iso-8859-1 charset
31 * fo_FO - Faroese, iso-8859-1 charset
32 * fr_FR - French, iso-8859-1 charset
33 * he_IL - Hebrew, windows-1255 charset
34 * hr_HR - Croatian, iso-8859-2 charset
35 * hu_HU - Hungarian, iso-8859-2 charset
36 * id_ID - Indonesian, iso-8859-1 charset
37 * is_IS - Icelandic, iso-8859-1 charset
38 * it_IT - Italian, iso-8859-1 charset
39 * ja_JP - Japanese, euc-jp charset (emails are created in iso-2022-jp)
40 * ko_KR - Korean, euc-kr charset
41 * lt_LT - Lithuanian, utf-8 charset
42 * ms_MY - Malay, iso-8859-1 charset
43 * nb_NO - Norwegian (Bokmal), iso-8859-1 charset
44 * nl_NL - Dutch, iso-8859-1 charset
45 * nn_NO - Norwegian (Nynorsk), iso-8859-1 charset
46 * pl_PL - Polish, iso-8859-2 charset
47 * pt_BR - Portuguese (Brazil), iso-8859-1 charset
48 * pt_PT - Portuguese (Portugal), iso-8859-1 charset
49 * ro_RO - Romanian, iso-8859-2 charset
50 * ru_UA - Ukrainian Russian, koi8-r charset
51 * ru_RU - Russian, utf-8 charset
52 * sk_SK - Slovak, iso-8859-2 charset
53 * sl_SI - Slovenian, iso-8859-2 charset
54 * sr_YU - Serbian, iso-8859-2 charset
55 * sv_SE - Swedish, iso-8859-1 charset
56 * ug - Uighur, utf-8 charset (some systems don't support Uighur system locale)
57 * th_TH - Thai, tis-620 charset
58 * tl_PH - Tagalog, iso-8859-1 charset (main translation is missing, only some plugins are translated)
59 * tr_TR - Turkish, iso-8859-9 charset
60 * uk_UA - Ukrainian, koi8-u charset
61 * zh_CN - Chinese Simplified, gb2312 charset
62 * zh_TW - Chinese Traditional, big5 charset
63
64 -------------------
65 2. $languages array
66 -------------------
67 TODO: add explanation of $languages array keys
68
69 ----------------------
70 3. XTRA_CODE functions
71 ----------------------
72 XTRA_CODE functions provides way to change interface behaviour, when translation
73 requires special handling of some squirrelmail functions. Functions are enabled
74 by setting XTRA_CODE option in $languages array and providing appropriate
75 functions. First part of function name is word listed in
76 $languages['language_code']['XTRA_CODE'] setting. Second part is one of special
77 keywords. Possible values:
78 * _decode
79 Used in src/compose.php, src/i18n.php, src/view_text.php, functions/mime.php
80 Requires mbstring support
81
82 * _encode
83 Used in src/compose.php, src/read_body.php
84
85 * _encodeheader
86 Used in functions/mime.php
87 Returning function
88
89 * _decodeheader
90 Used in functions/mime.php
91 Returning function
92
93 * _downloadfilename
94 Used in functions/mime.php
95
96 * _utf7_imap_encode
97 Used in functions/imap_utf7_local.php
98 Returning function
99
100 * _utf7_imap_decode
101 Used in functions/imap_utf7_local.php
102 Returning function
103
104 * _strimwidth
105 Used in functions/mailbox_display.php
106 Returning function
107
108 * _wordwrap
109 Used in functions/strings.php (sqWordWrap)
110
111 --------------------------------
112 4. Display of different charsets
113 --------------------------------
114 TODO: add explanation of decoding functions
115
116 --------------------
117 5. IMAP folder names
118 --------------------
119 TODO: add explanation about UTF7-IMAP and mbstring