<?xml version="1.0"?>
<!--
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
  <properties>
    <title>Localization for Jetspeed 2</title>
    <subtitle>Jetspeed 2 Localization for your language</subtitle>
    <authors>
      <person name="Shinsuke Sugaya" email="shinsuke@yahoo.co.jp"/>
    </authors>
  </properties>
  <body>
<section name="Translate Messages">
<p>
Jetspeed2 has the translatable messages in Java properties and XML files
</p>
<subsection name="Properties File">
<p>
This document shows how to create a message properties file for your language.
</p>
<h5>1. Find <code>*_en.properties</code></h5>
<p>
<code>*_en.properties</code> is English message properties file. You can use it as a base properties file for your language. 
</p>
<p>
If you use UNIX system, you can use <code>find</code> command to find the properties files:
</p>
<source test=""><![CDATA[
$ cd ${jetspeed-2-home}
$ find . -type f | grep -v CVS | grep _en.properties
]]></source>
<h5>2. Copy <code>*_en.properties</code> to <code>*_&lt;your language, [country and variant]&gt;.properties.orig</code></h5>
<p>
To translate messages, copy the properties file for your language. For more information about Language, Country and Variant code, see "<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Locale.html">JavaDoc: Locale Class</a>", "<a href="http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt">ISO Language Code</a>" and "<a href="http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html">ISO Country Code</a>".
</p>
<p>
Example:
</p>
<source test=""><![CDATA[
$ cd applications/localeselector/src/java/org/apache/jetspeed/portlets/localeselector/resources/
$ cp LocaleSelectorResources_en.properties LocaleSelectorResources_ja.properties.orig
]]></source>
<p>
where <code>*_ja.properties</code> is Japanese message file.
</p>
<h5>3. Translate *_&lt;your language, [country and variant]&gt;.properties.orig in your language</h5>
<p>
For more information about a properties file, see "<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream)">JavaDoc: Properties Class</a>".
</p>
<h5>4. Run <code>native2ascii</code> command</h5>
<p>
Since the properties file is assumed to be using the ISO 8859-1 character encoding, use <code>native2ascii</code> command to convert to ISO 8859-1. For more information about "<a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/solaris/native2ascii.html">native2ascii(Solaris)</a>" or "<a href="http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/native2ascii.html">native2ascii(Windows)</a>".
</p>
<p>
Example:
</p>
<source test=""><![CDATA[
$ native2ascii LocaleSelectorResources_ja.properties.orig LocaleSelectorResources_ja.properties
]]></source>
<h5>5. Build &amp; Deploy Jetspeed2, and see if your translation is displayed</h5>
<p>
For more information about Jetspeed 2 build and deploy steps, see "<a href="getting-started.html">Getting Started</a>".
</p>
<h5>6. Create a new JIRA issue, and attach <code>*_&lt;your language, [country and variant]&gt;.properties</code></h5>
<p>
JIRA site for Jetspeed 2 is <a href="http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10492">http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10492</a>. To create a new JIRA issue, go to "CREATE NEW ISSUE"(select "l10n" as Component/s name).
</p>

</subsection>
</section>

</body>
</document>

