• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

en-us/H03-May-2022-8,1226,592

Makefile.amH A D07-Oct-20021.8 KiB4729

Makefile.inH A D03-May-202222.2 KiB691595

README_LANG.html.inH A D24-Jul-20037.3 KiB190135

aclocal.m4H A D11-Feb-201121.5 KiB602536

configureH A D03-May-2022102.3 KiB3,5382,850

configure.c++20H A D03-May-2022102.3 KiB3,5382,850

configure.inH A D26-Feb-2007798 3525

lstsoftlinksH A D07-Mar-2000474 2618

mksoftlinksH A D08-Dec-1999594 3321

rmsoftlinksH A D07-Mar-2000532 3119

README_LANG.html.in

1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
2                      "http://www.w3.org/TR/REC-html40/loose.dtd">
3<html>
4<head>
5  <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
6  <meta name="Author" content="Sam Varshavchik" />
7  <title>SqWebMail</title>
8  <!-- $Id: README_LANG.html.in,v 1.4 2003/07/24 23:04:54 mrsam Exp $ -->
9  <!-- Copyright 1998 - 1999 Double Precision, Inc.  See COPYING for -->
10  <!-- distribution information. -->
11</head>
12
13<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B"
14alink="#FF0000" lang="en">
15<h1>SqWebMail Language translations</h1>
16
17<p>Starting with version 0.23, SqWebMail includes configuration scripts in the
18html subdirectory (the one where you found this file) which make it possible
19to be able to add translated HTML templates to SqWebMail very easily. You will
20be able to create and maintain the translated HTML templates all by
21yourself.</p>
22
23<p>Before you set up a translated HTML template set, you will need to have the
24following information:</p>
25<ul>
26  <li>ISO code/locality for your translation. For example, I distribute
27    SqWebMail with the HTML templates for en-us - English-US. If, for example,
28    you wanted to create an HTML template set for English-British, your ISO
29    code/locality would be en-gb. If you wanted to create an HTML template set
30    for French, your ISO code/locality would be fr-fr, and so on.<br>
31    <br>
32  </li>
33  <li>Locale code. This is the name of the i18n locale that's installed on
34    your system. The locale primarily determines how dates are displayed. It
35    is usually very similar to the ISO code/locality. For example, the i18n
36    locale for English-US is en_US, for English-British it's en_GB, for French
37    it's fr_FR. Try checking for the LOCALE environment variable, the manual
38    page for locale(7), or the contents of <tt>/usr/share/locale</tt>
39    directory.<br>
40
41    <p></p>
42  </li>
43  <li>The MIME character set. This specifies the character set of messages in
44    this language. For most european languages, it is iso-8859-1.<br>
45    <br>
46  </li>
47  <li>The name of the ispell dictionary for your language. For example, for
48    English-US, the corresponding ispell dictionary is called "american", for
49    German, it's "german".</li>
50</ul>
51
52<h2>Extract sqwebmail, and run configure</h2>
53
54<p>First, you want to take the standard <tt>sqwebmail-@VERSION@.tar.gz</tt>
55tarball, and extract it, then run the <tt>configure</tt> script with your
56usual options:</p>
57
58<p><tt>$ tar xzvf sqwebmail-@VERSION@.tar.gz</tt><br>
59<tt>$ cd sqwebmail-@VERSION@</tt><br>
60<tt>$ ./configure [ your usual options go here ]</tt></p>
61
62<p>Change to the html subdirectory.</p>
63
64<p><tt>$ cd html</tt></p>
65
66<p>The standard <tt>sqwebmail-@VERSION.tar.gz</tt> includes the subdirectory
67html/en-us. Let's say you want to translate it into French.</p>
68
69<p>The ISO code/locality is fr-fr.</p>
70
71<p>The locale code is fr_FR.</p>
72
73<p>The ispell dictionary name is "french".</p>
74
75<p>The first thing that needs to be done is to create another subdirectory in
76html. The name of the subdirectory must be the ISO code/locality for the
77language.</p>
78
79<p>You don't have to do it by hand. There's a special target in html/Makefile
80that will do it for you!</p>
81
82<p><tt>$ make clone from=en-us to=fr-fr</tt></p>
83
84<p>This script takes the Makefile, the configure script, and other files from
85the <tt>html/en-us</tt> subdirectory, and creates the <tt>html/fr-fr</tt>
86subdirectory which will temporary contain the mirror image of the
87<tt>html/en-us</tt> subdirectory.</p>
88
89<h2>Setting LANGUAGE_PREF</h2>
90
91<p>You now have to make minor changes to some files in the fr-fr subdirectory.
92<tt>fr-fr/LANGUAGE</tt> will be automatically created by the make clone
93script. However, you must initialize the contents of the
94<tt>fr-fr/LANGUAGE_PREF</tt> file:</p>
95
96<p><tt>$ echo fr50 fr-fr >fr-fr/LANGUAGE_PREF</tt></p>
97
98<p>The LANGUAGE_PREF file must contain exactly one line with two words. The
99second word must always be the ISO code/locality. The first word is used to
100sort all the installed HTML templates alphabetically by ISO code/locality, and
101it's used to selecte the preferred locality within the same ISO code.</p>
102
103<p>For example, the contents of <tt>en-us/LANGUAGE_PREF</tt> is "en50 en-us".
104Let's say you want to have both en-us and en-gb HTML templates. If you want
105clients requesting the "en" HTML to receive the en-gb HTML, you will have to
106set <tt>en-gb/LANGUAGE_PREF</tt> to something like "en40 en-gb":</p>
107
108<p><tt>$ echo en40 en-gb >en-gb/LANGUAGE_PREF</tt></p>
109
110<p>If you want clients requesting the "en" HTML to receive the en-us HTML, you
111will have to do something like this:</p>
112
113<p><tt>$ echo en60 en-gb >en-gb/LANGUAGE_PREF</tt></p>
114
115<p>The first word in all the LANGUAGE_PREF files is used to sort the list of
116all the available HTML templates, and the sorted list is used to select the
117preferred locality within the same ISO code.</p>
118
119<h2>Setting LOCALE</h2>
120
121<p>Let's resume the example with the French translation. The next file that
122needs to be changed is LOCALE. This file contains the locale code for the
123language. For French, the locale code is fr_FR:</p>
124
125<p><tt>$ echo fr_FR >fr-fr/LOCALE</tt></p>
126
127<h2>Setting CHARSET</h2>
128
129<p>The CHARSET file sets the MIME character set of outgoing messages. For US
130and most european languages, this value should be <tt>iso-8859-1</tt></p>
131
132<p><tt>$ echo iso-8859-1 >fr-fr/CHARSET</tt></p>
133
134<h2>Setting ISPELLDICT</h2>
135
136<p>Finally, you need to specify which dictionary ispell will use for spell
137checking. For French, the dictionary is simply named "french":</p>
138
139<p><tt>$ echo french >fr-fr/ISPELLDICT</tt></p>
140
141<p>If you do not have an ispell dictionary for this language, initialize
142ISPELLDICT with the name of the default dictionary.</p>
143
144<h2>Rerunning the configure script</h2>
145
146<p>You now need to rerun the configure script in the main sqwebmail
147directory:</p>
148
149<p><tt>$ cd ..<br>
150$ ./configure [ options ]</tt></p>
151
152<p>This reruns the configure script in the sqwebmail-@VERSION@ directory,
153which will now pick up your new html/fr-fr subdirectory, which will be
154configured in.</p>
155
156<h2>Creating the actual translations</h2>
157
158<p>Now, you can edit all the .html files in html/fr-fr, and replace all
159English text with its French equivalent.</p>
160
161<p>If you now do a make, followed by make install, the installation script
162will install both the original en-us HTML templates and fr-fr HTML templates
163together.</p>
164
165<p>If you now run make dist:</p>
166
167<p><tt>$ make dist</tt></p>
168
169<p>This will create a new <tt>sqwebmail-@VERSION@.tar.gz</tt> tarball,
170containing both sets of HTML templates, which you can now distribute!</p>
171
172<h2>Updating translations for new versions of SqWebMail</h2>
173
174<p>Well, what should you do when a new version of SqWebMail is available?</p>
175
176<p>First, you need to determine whether or not there were any changes to the
177contents of the <tt>html/en-us</tt> subdirectory. Then, you will have to apply
178the same changes to the translated contents of the old <tt>html/fr-fr</tt>
179subdirectory.</p>
180
181<p>Then, repeat the previous procedure for the new version of SqWebMail, but
182before running the <tt>configure</tt> script for the second time, copy all the
183<tt>.html</tt> files from the previous version of SqWebMail (plus any changes
184or new files) into the <tt>html/fr-fr</tt> subdirectory of the new
185version.</p>
186
187<p></p>
188</body>
189</html>
190