Commit 25b73f73 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Added translator guide.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1007 b35dd754-fafc-0310-a699-88a17e54d16e
parent d1291e41
......@@ -44,9 +44,13 @@ messaging (IM) services using the XMPP protocol.
Jive Messenger API documentation.
</li>
<li>
<a href="plugin-dev-guide.html">Plugin Guide</a> -
<a href="plugin-dev-guide.html">Plugin Developer Guide</a> -
A guide to writing and installing plugins for Jive Messenger.
</li>
<li>
<a href="translator-guide.html">Translator Guide</a> -
Information for those interested in translating the admin console of Jive Messenger into other languages.
</li>
<li>
<a href="database-guide.html">Database Schema Guide</a> -
A tour of the Jive Messenger database schema for developers and database administrators.
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Jive Messenger Translator Guide</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Jive Messenger Translator Guide</h1>
<a name="top"></a>
<h2>Introduction</h2>
<p>
The Jive Messenger admin console can be easily translated into other languages. This document
provides instructions for those that wish to make translations.
</p>
<p>
All text in the Jive Messenger admin console is stored in a resource
bundle. A resource bundle is a file containing key/value pairs. Words and phrases are
represented using keys. The correct values are retrieved based on locale settings
(English values are used for English locales, French values for French locales, etc).
Key/value pairs in the English resource bundle might look like the following:
<pre>
skin.yes=Yes
skin.no=No
skin.topic=Topic
skin.message=Message
</pre>
The German resource bundle would contain the same keys, but different values:
<br>
<pre>
skin.yes=<i>Ja</i>
skin.no=<i>Nein</i>
skin.topic=<i>Thema</i>
skin.message=<i>Beitrag</i>
</pre>
Making your own translation involves copying the English resource bundle,
renaming the file, then translating its contents.</p>
<h2>Construct a Resource Bundle</h2>
<p>To start, make a copy of the default (English) locale file "messenger_i18n.properties".
It can be found in the <tt>resources\i18n</tt> directory of your Jive Messenger
installation. Note: the files found in <tt>resources\i18n</tt> are copies of the
real resource bundles used by the application (the real resource bundles are contained
in the messenger.jar file). Editing the resource files in the <tt>resources\i18n</tt>
directory will not affect your running copy of Jive Messenger.</p>
<p>Next, you'll need to rename the file to match the locale that you're making a
translation for. The syntax of the name is "messenger_i18n_[lang]_[country].properties".
However, the country code should be used in most cases. For example, the German resource
bundle should be named "messenger_i18n_de.properties" because
"de" is the language code for German. For French, the file would be called
"messenger_i18n_fr.properties". A list of language codes can
be found at:
<a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt"
target="_new">http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt</a>.
Some locales require a combination of language and country code. For example
simplified Chinese would have the name "messenger_i18n_zh_CN.properties"
while traditional Chinese would have the name "messenger_i18n_zh_TW.properties".</p>
<h2>Translate the Resource Bundle</h2>
<p>Next, use your favorite text editor to translate the English values into
your language. The key names must not be changed.</p>
<p>When translating from English, you may need to use special characters
for your language (for example, Germans use characters like &auml;,
&uuml;, or &szlig;). Unfortunately, all resource bundle files must be saved
in ASCII format which doesn't allow for international characters. We
recommend working on your translation in a text editor
that supports all characters in your language. After finishing your translation,
use the "native2ascii" tool (bundled with Java) to convert international
characters to the ASCII format. To use the native2ascii tool:</p>
<pre>
native2ascii -encoding XXX my_translation.properties messenger_i18n_YY.properties
^ ^
input file output file
</pre>
<p>The "-encoding XXX" parameter is optional. If you don't specify it, Java will
use the default encoding value, taken from System property "file.encoding".
If you do specify an encoding (XXX), it must be taken from the first column of
the table of supported encodings in the
<a href="http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html" target="_new">Supported Encodings</a>
document. For example, if you created your translation using UTF-8 as your encoding and
you are making a Simplified Chinese translation:</p>
<pre>
native2ascii -encoding UTF8 my_translation.properties messenger_i18n_zh_CN.properties
</pre>
<h2>Testing Your Translation</h2>
<p>To test your translation, copy the translated resource bundle file (example,
messenger_i18n_de.properties) to the <tt>lib/</tt> directory of your Jive Messenger
installation. Make sure Jive Messenger is stopped and then edit the <tt>conf/jive-messenger.xml</tt>
file. Set the <tt>adminConsole.locale</tt> property to match your new resource
bundle such as "de" or "zh/CN". Start Jive Messenger and the admin console
should now be using your translation. If you still see English text you may have
named your bundle incorrectly or used the wrong value for the <tt>adminConsole.locale</tt>
property.</p>
<p>Once your translation is complete and tested, please submit it to the Jive Messenger
developers so that others can enjoy it in the next release!</p>
<br><br>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment