README_LANG.html.in
上传用户:s81996212
上传日期:2007-01-04
资源大小:722k
文件大小:7k
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <meta name="Author" content="Sam Varshavchik">
- <title>SqWebMail</title>
- <!-- $Id: README_LANG.html.in,v 1.3 2000/02/17 04:53:33 mrsam Exp $ -->
- <!-- Copyright 1998 - 1999 Double Precision, Inc. See COPYING for -->
- <!-- distribution information. -->
- </head>
- <body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B"
- alink="#FF0000" lang="en">
- <h1>SqWebMail Language translations</h1>
- <p>Starting with version 0.23, SqWebMail includes configuration scripts in the
- html subdirectory (the one where you found this file) which make it possible
- to be able to add translated HTML templates to SqWebMail very easily. You will
- be able to create and maintain the translated HTML templates all by
- yourself.</p>
- <p>Before you set up a translated HTML template set, you will need to have the
- following information:</p>
- <ul>
- <li>ISO code/locality for your translation. For example, I distribute
- SqWebMail with the HTML templates for en-us - English-US. If, for example,
- you wanted to create an HTML template set for English-British, your ISO
- code/locality would be en-gb. If you wanted to create an HTML template set
- for French, your ISO code/locality would be fr-fr, and so on.<br>
- <br>
- </li>
- <li>Locale code. This is the name of the i18n locale that's installed on
- your system. The locale primarily determines how dates are displayed. It
- is usually very similar to the ISO code/locality. For example, the i18n
- locale for English-US is en_US, for English-British it's en_GB, for French
- it's fr_FR. Try checking for the LOCALE environment variable, the manual
- page for locale(7), or the contents of <tt>/usr/share/locale</tt>
- directory.<br>
- <p></p>
- </li>
- <li>The MIME character set. This specifies the character set of messages in
- this language. For most european languages, it is iso-8859-1.<br>
- <br>
- </li>
- <li>The name of the ispell dictionary for your language. For example, for
- English-US, the corresponding ispell dictionary is called "american", for
- German, it's "german".</li>
- </ul>
- <h2>Extract sqwebmail, and run configure</h2>
- <p>First, you want to take the standard <tt>sqwebmail-@VERSION@.tar.gz</tt>
- tarball, and extract it, then run the <tt>configure</tt> script with your
- usual options:</p>
- <p><tt>$ tar xzvf sqwebmail-@VERSION@.tar.gz</tt><br>
- <tt>$ cd sqwebmail-@VERSION@</tt><br>
- <tt>$ ./configure [ your usual options go here ]</tt></p>
- <p>Change to the html subdirectory.</p>
- <p><tt>$ cd html</tt></p>
- <p>The standard <tt>sqwebmail-@VERSION.tar.gz</tt> includes the subdirectory
- html/en-us. Let's say you want to translate it into French.</p>
- <p>The ISO code/locality is fr-fr.</p>
- <p>The locale code is fr_FR.</p>
- <p>The ispell dictionary name is "french".</p>
- <p>The first thing that needs to be done is to create another subdirectory in
- html. The name of the subdirectory must be the ISO code/locality for the
- language.</p>
- <p>You don't have to do it by hand. There's a special target in html/Makefile
- that will do it for you!</p>
- <p><tt>$ make clone from=en-us to=fr-fr</tt></p>
- <p>This script takes the Makefile, the configure script, and other files from
- the <tt>html/en-us</tt> subdirectory, and creates the <tt>html/fr-fr</tt>
- subdirectory which will temporary contain the mirror image of the
- <tt>html/en-us</tt> subdirectory.</p>
- <h2>Setting LANGUAGE_PREF</h2>
- <p>You now have to make minor changes to some files in the fr-fr subdirectory.
- <tt>fr-fr/LANGUAGE</tt> will be automatically created by the make clone
- script. However, you must initialize the contents of the
- <tt>fr-fr/LANGUAGE_PREF</tt> file:</p>
- <p><tt>$ echo fr50 fr-fr >fr-fr/LANGUAGE_PREF</tt></p>
- <p>The LANGUAGE_PREF file must contain exactly one line with two words. The
- second word must always be the ISO code/locality. The first word is used to
- sort all the installed HTML templates alphabetically by ISO code/locality, and
- it's used to selecte the preferred locality within the same ISO code.</p>
- <p>For example, the contents of <tt>en-us/LANGUAGE_PREF</tt> is "en50 en-us".
- Let's say you want to have both en-us and en-gb HTML templates. If you want
- clients requesting the "en" HTML to receive the en-gb HTML, you will have to
- set <tt>en-gb/LANGUAGE_PREF</tt> to something like "en40 en-gb":</p>
- <p><tt>$ echo en40 en-gb >en-gb/LANGUAGE_PREF</tt></p>
- <p>If you want clients requesting the "en" HTML to receive the en-us HTML, you
- will have to do something like this:</p>
- <p><tt>$ echo en60 en-gb >en-gb/LANGUAGE_PREF</tt></p>
- <p>The first word in all the LANGUAGE_PREF files is used to sort the list of
- all the available HTML templates, and the sorted list is used to select the
- preferred locality within the same ISO code.</p>
- <h2>Setting LOCALE</h2>
- <p>Let's resume the example with the French translation. The next file that
- needs to be changed is LOCALE. This file contains the locale code for the
- language. For French, the locale code is fr_FR:</p>
- <p><tt>$ echo fr_FR >fr-fr/LOCALE</tt></p>
- <h2>Setting CHARSET</h2>
- <p>The CHARSET file sets the MIME character set of outgoing messages. For US
- and most european languages, this value should be <tt>iso-8859-1</tt></p>
- <p><tt>$ echo iso-8859-1 >fr-fr/CHARSET</tt></p>
- <h2>Setting ISPELLDICT</h2>
- <p>Finally, you need to specify which dictionary ispell will use for spell
- checking. For French, the dictionary is simply named "french":</p>
- <p><tt>$ echo french >fr-fr/ISPELLDICT</tt></p>
- <p>If you do not have an ispell dictionary for this language, initialize
- ISPELLDICT with the name of the default dictionary.</p>
- <h2>Rerunning the configure script</h2>
- <p>You now need to rerun the configure script in the main sqwebmail
- directory:</p>
- <p><tt>$ cd ..<br>
- $ ./configure [ options ]</tt></p>
- <p>This reruns the configure script in the sqwebmail-@VERSION@ directory,
- which will now pick up your new html/fr-fr subdirectory, which will be
- configured in.</p>
- <h2>Creating the actual translations</h2>
- <p>Now, you can edit all the .html files in html/fr-fr, and replace all
- English text with its French equivalent.</p>
- <p>If you now do a make, followed by make install, the installation script
- will install both the original en-us HTML templates and fr-fr HTML templates
- together.</p>
- <p>If you now run make dist:</p>
- <p><tt>$ make dist</tt></p>
- <p>This will create a new <tt>sqwebmail-@VERSION@.tar.gz</tt> tarball,
- containing both sets of HTML templates, which you can now distribute!</p>
- <h2>Updating translations for new versions of SqWebMail</h2>
- <p>Well, what should you do when a new version of SqWebMail is available?</p>
- <p>First, you need to determine whether or not there were any changes to the
- contents of the <tt>html/en-us</tt> subdirectory. Then, you will have to apply
- the same changes to the translated contents of the old <tt>html/fr-fr</tt>
- subdirectory.</p>
- <p>Then, repeat the previous procedure for the new version of SqWebMail, but
- before running the <tt>configure</tt> script for the second time, copy all the
- <tt>.html</tt> files from the previous version of SqWebMail (plus any changes
- or new files) into the <tt>html/fr-fr</tt> subdirectory of the new
- version.</p>
- <p></p>
- </body>
- </html>