Author: jaredmorgs
Date: 2013-01-16 00:12:37 -0500 (Wed, 16 Jan 2013)
New Revision: 9055
Added:
epp/docs/branches/6.0/Reference_Guide/en-US/images/PortalDevelopment/Internationalization/
epp/docs/branches/6.0/Reference_Guide/en-US/images/PortalDevelopment/Internationalization/LanguageChoice.png
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.ent
epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortalDevelopment_InternationalizationConfiguration/default151.xml
epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortalDevelopment/InternationalizationConfiguration.xml
Log:
https://docs.jboss.org/author/display/GTNPORTAL35/Internationalization+Co...
Incorporated changes up to V3 of the revision history.
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.ent
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.ent 2013-01-16 01:08:30
UTC (rev 9054)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/Reference_Guide.ent 2013-01-16 05:12:37
UTC (rev 9055)
@@ -5,12 +5,12 @@
<!ENTITY BOOKID "Reference Guide">
<!-- Bugzilla Specifics -->
-<!ENTITY BZPRODUCT "JBoss Portal Platform 6">
+<!ENTITY BZPRODUCT "JBoss Enterprise Portal Platform 6">
<!ENTITY BZCOMPONENT "docs-Reference_Guide">
<!ENTITY BZURL "<ulink
url='https://bugzilla.redhat.com/enter_bug.cgi?product=JBoss&perc...
<!-- Corporate Specifics: -->
-<!ENTITY YEAR "2012">
+<!ENTITY YEAR "2013">
<!ENTITY HOLDER "Red Hat, Inc">
<!-- Version Specifcs: -->
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-16 01:08:30
UTC (rev 9054)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-16 05:12:37
UTC (rev 9055)
@@ -7,7 +7,22 @@
<title>Revision History</title>
<simpara>
<revhistory>
- <revision>
+ <revision>
+ <revnumber>6.0.0-29</revnumber>
+ <date>Wed Jan 16 2013</date>
+ <author>
+ <firstname>Jared</firstname>
+ <surname>Morgan</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Made changes from
https://docs.jboss.org/author/display/GTNPORTAL35/Internationalization+Co...
</member>
+ <member>I have some NEEDINFO to be answered by ppalaga before this can
be finalized.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
<revnumber>6.0.0-28</revnumber>
<date>Mon Jan 7 2013</date>
<author>
@@ -21,7 +36,7 @@
</simplelist>
</revdescription>
</revision>
- <revision>
+ <revision>
<revnumber>6.0.0-27</revnumber>
<date>Fri Jan 4 2013</date>
<author>
@@ -35,7 +50,7 @@
</simplelist>
</revdescription>
</revision>
- <revision>
+ <revision>
<revnumber>6.0.0-26</revnumber>
<date>Mon Dec 21 2012</date>
<author>
@@ -49,7 +64,7 @@
</simplelist>
</revdescription>
</revision>
- <revision>
+ <revision>
<revnumber>6.0.0-19</revnumber>
<date>Mon Dec 12 2012</date>
<author>
@@ -63,7 +78,7 @@
</simplelist>
</revdescription>
</revision>
- <revision>
+ <revision>
<revnumber>6.0.0-18</revnumber>
<date>Mon Dec 11 2012</date>
<author>
@@ -91,20 +106,20 @@
</simplelist>
</revdescription>
</revision>
- <revision>
- <revnumber>6.0.0-23</revnumber>
- <date>Fri Nov 30 2012</date>
- <author>
+ <revision>
+ <revnumber>6.0.0-23</revnumber>
+ <date>Fri Nov 30 2012</date>
+ <author>
<firstname>Scott</firstname>
<surname>Mumford</surname>
- <email></email>
- </author>
- <revdescription>
+ <email/>
+ </author>
+ <revdescription>
<simplelist>
- <member>BZ#807499: Added SME approved content regarding advanced WCI
registration features.</member>
+ <member>BZ#807499: Added SME approved content regarding advanced WCI
registration features.</member>
</simplelist>
- </revdescription>
- </revision>
+ </revdescription>
+ </revision>
<revision>
<revnumber>6.0.0-22</revnumber>
<date>Fri Nov 30 2012</date>
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortalDevelopment_InternationalizationConfiguration/default151.xml
===================================================================
---
epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortalDevelopment_InternationalizationConfiguration/default151.xml 2013-01-16
01:08:30 UTC (rev 9054)
+++
epp/docs/branches/6.0/Reference_Guide/en-US/extras/PortalDevelopment_InternationalizationConfiguration/default151.xml 2013-01-16
05:12:37 UTC (rev 9055)
@@ -7,7 +7,8 @@
<name>classpath.resources</name>
<description>The resources that start with the following package name should
be load from file system</description>
<value>locale.portlet</value>
- </values-param>
+ </values-param>
+ <!--Comment #2 -->
<values-param>
<name>init.resources</name>
<description>Initiate the following resources during the first
launch</description>
@@ -21,7 +22,7 @@
<value>locale.navigation.group.platform.guests</value>
<value>locale.navigation.group.organization.management.executive-board</value>
</values-param>
- <!-- Comment #2 -->
+ <!-- Comment #3 -->
<values-param>
<name>portal.resource.names</name>
<description>The properties files of the portal , those file will be merged
Added:
epp/docs/branches/6.0/Reference_Guide/en-US/images/PortalDevelopment/Internationalization/LanguageChoice.png
===================================================================
(Binary files differ)
Property changes on:
epp/docs/branches/6.0/Reference_Guide/en-US/images/PortalDevelopment/Internationalization/LanguageChoice.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortalDevelopment/InternationalizationConfiguration.xml
===================================================================
---
epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortalDevelopment/InternationalizationConfiguration.xml 2013-01-16
01:08:30 UTC (rev 9054)
+++
epp/docs/branches/6.0/Reference_Guide/en-US/modules/PortalDevelopment/InternationalizationConfiguration.xml 2013-01-16
05:12:37 UTC (rev 9055)
@@ -58,14 +58,14 @@
Various languages are available in the portal package. The configuration
below will define which languages are shown in the "<emphasis
role="bold">Change Language</emphasis>" section and made
available to users.
</para>
<para>
- The
<filename>02portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>
file of your installation contains the following section:
+ The
<filename>portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>
file of your installation contains the following section:
</para>
<programlisting language="XML" role="XML"><xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../extras/PortalDevelopment_InternationalizationConfiguration/default149.xml"
parse="text"/></programlisting>
<para>
This configuration points to the locale configuration file.
</para>
<para>
- The locale configuration file
(<filename>02portal.war:/WEB-INF/conf/common/locales-config.xml</filename>)
contains the following code:
+ The locale configuration file
(<filename>portal.war:/WEB-INF/conf/common/locales-config.xml</filename>)
contains the following code:
</para>
<example>
<title>The locales-config.xml File Explanation</title>
@@ -90,16 +90,17 @@
<section
id="sect-Reference_Guide-Internationalization_Configuration-ResourceBundleService">
<title>ResourceBundleService</title>
<para>
- The resource bundle service is configured in:
<filename>02portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>:
+ The resource bundle service is configured in:
<filename>portal.war:/WEB-INF/conf/common/common-configuration.xml</filename>:
</para>
- <example>
+ <example id="exam-common_config_xml_file_explained">
<title>The common-configuration.xml file explained</title>
<programlisting language="XML" role="XML"><xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../extras/PortalDevelopment_InternationalizationConfiguration/default151.xml"
parse="text"/></programlisting>
<para>
Comment #1: resources whose package name starts with the name
specified in the <emphasis>classpath.resources</emphasis> parameter are loaded
from the file system. Detailed information can be found in a later section of this
chapter.
</para>
+ <para>Comment #2: resources related to portal, group, and user reference
bundles</para>
<para>
- Comment #2: the
<emphasis>portal.resource.names</emphasis> parameter defines all resources
that belong to the <emphasis>Portal Resource Bundle</emphasis>. These
resources are merged to a single resource bundle which is accessible from anywhere in
JBoss Portal Platform. All these keys are located in the same bundle, which is separated
from the navigation resource bundles.
+ Comment #3: the
<emphasis>portal.resource.names</emphasis> parameter defines all resources
that belong to the <emphasis>Portal Resource Bundle</emphasis>. These
resources are merged to a single resource bundle which is accessible from anywhere in
JBoss Portal Platform. All these keys are located in the same bundle, which is separated
from the navigation resource bundles.
</para>
</example>
</section>
@@ -108,11 +109,10 @@
<para>
There is a resource bundle for each navigation. A navigation can exist for
user, groups, and portal.
</para>
- <para>
- The previous example shows bundle definitions for the navigation of the
classic portal and of four different groups. Each of these resource bundles occupies a
different sphere, they are independent of each other and they are not included in the
<parameter>portal.resource.names</parameter> parameter.
+ <para><xref linkend="exam-common_config_xml_file_explained"/>
shows bundle definitions for the navigation of the classic portal and of four different
groups. Each of these resource bundles occupies a different sphere, they are independent
of each other and they are not included in the
<parameter>portal.resource.names</parameter> parameter.
</para>
<para>
- The properties for a group must be in the
<filename>WEB-INF/classes/locale/navigation/group/</filename> folder. For
example;
<literal>/WEB-INF/classes/locale/navigation/group/organization/management/executive-board_en.properties</literal>.
+ The properties for a group must be in the
<filename>WEB-INF/classes/locale/navigation/group/</filename> folder. For
example,
<literal>/WEB-INF/classes/locale/navigation/group/organization/management/executive-board_en.properties</literal>.
</para>
<para>
The folder and file names must correspond to the group hierarchy. The group
name "<parameter>executive-board</parameter>" is followed by
the ISO 639 code.
@@ -134,13 +134,13 @@
Portlets are independent applications and deliver their own resource files.
</para>
<para>
- All shipped portlet resources are located in the <emphasis
role="bold">locale/portlet</emphasis> sub-folder. The
ResourceBundleService parameter <emphasis
role="bold">classpath.resources</emphasis> defines this sub-folder.
<!-- Doing so the resource file that are in ~~locale/portlet~~ will never be
stored in the JCR and reloaded at each start of the application server. -->
+ All shipped portlet resources are located in the <emphasis
role="bold">locale/portlet</emphasis> sub-folder. The
ResourceBundleService parameter <emphasis
role="bold">classpath.resources</emphasis> defines this sub-folder.
</para>
<procedure
id="proc-Reference_Guide-Portlets-To_add_a_Spanish_translation_to_the_GadgetPortlet">
- <title>To add a Spanish translation to the GadgetPortlet</title>
+ <title>Add Spanish Translation to the GadgetPortlet</title>
<step>
<para>
- Create the file
<literal>GadgetPortlet_es.properties</literal> in:
<filename>WEB-INF/classes/locale/portlet/gadget/GadgetPortlet</filename>.
+ Create the file
<literal>GadgetPortlet_es.properties</literal> in
<filename>WEB-INF/classes/locale/portlet/gadget/GadgetPortlet</filename>.
</para>
</step>
<step>
@@ -162,64 +162,108 @@
</para>
<programlisting language="Java"
role="Java"><xi:include
xmlns:xi="http://www.w3.org/2001/XInclude"
href="../../extras/PortalDevelopment_InternationalizationConfiguration/default154.java"
parse="text"/></programlisting>
</section>
-<!-- Commented out as not fully enterprise ready:
https://jira.jboss.org/browse/GTNPORTAL-1482
-Will reinstate when issues resolved
-<section
id="sect-Reference_Guide-_Portlets_-Debugging_Resource_Bundle_Usage">
-<title>Debugging Resource Bundle Usage</title>
-<para>
+ <section
id="sect-Reference_Guide-_Portlets_-Debugging_Resource_Bundle_Usage">
+ <title><remark>NEEDINFO </remark>Debugging Resource Bundle
Usage</title>
+ <remark>NEEDINFO - jmorgan - from
https://docs.jboss.org/author/display/GTNPORTAL35/Internationalization+Co... there
is mention of enabling debug mode, and using the Magic Locale. This was commented out in
the XML here, but I have reinstated it and tried to add some more info to it. It needs to
be verified for correctness. </remark>
+ <para>
When translating an application it can sometimes be difficult to find the right key for a
given property.
</para>
-<para>
-You can start the Portal in <emphasis>debug mode</emphasis> and use the
<emphasis role="bold">Magic locale</emphasis> special language to
assist in finding the correct translated key value.
+ <para>
+You can start the Portal in <emphasis>debug mode</emphasis> and use the
<emphasis role="bold">Magic locale</emphasis> from the list of
available portal languages to assist in finding the correct translated key value.
+This special locale translates a key to the same value.</para>
+ <para>For example, the translated value for the
"organization.title" key is the value
"organization.title". Selecting Magic locale allows use of the portal
and its applications with all the keys visible. This makes it easier to discover the
correct key for a given label in the portal page.</para>
+ <remark>NEEDINFO - jmorgan - 20130116 - I have added these procedures based
on commented out material written for EPP 5. I have updated it to what I think is
required, but can't seem to get the Magic locale to display.</remark>
+ <procedure>
+ <title>Executing the portal in debug mode</title>
+ <step>
+ <para>
+Open the <replaceable>JBOSS_HOME/bin/standalone.conf</replaceable> file in a
text editor.
</para>
-<procedure>
-<title>Executing the portal in <emphasis role="bold">debug
mode</emphasis></title>
-<step>
-<para>
-Open the <replaceable>JBOSS_AS</replaceable>
<filename>run.conf</filename> file.
+ </step>
+ <step>
+ <para>Add the <literal>-Xdebug</literal> parameter to the JVM
<emphasis role="bold">JAVA_OPTS</emphasis> listed on (or near, if
you have made previous configuration changes) line 49.
</para>
-<programlisting>[<replaceable>USER</replaceable>@<replaceable>HOST</replaceable>
<replaceable>JBOSS_AS</replaceable>]$ vi bin/run.conf
-</programlisting>
-</step>
-<step>
-<para>
-Add the <literal>-Xdebug</literal> parameter to the JVM <emphasis
role="bold">JAVA_OPTS</emphasis> listed on (or near, if you have made
previous configuration changes) line 45.
-</para>
-<programlisting>if [ "x$JAVA_OPTS" = "x" ]; then
-JAVA_OPTS="-Xms256m -Xmx512m <emphasis
role="bold">-Xdebug</emphasis> -XX:MaxPermSize=256m
-Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000
-Dsun.rmi.dgc.server.gcInterval=3600000
-Dsun.lang.ClassLoader.allowArraySyntax=true"
+ <programlisting>if [ "x$JAVA_OPTS" =
"x" ]; then
+ JAVA_OPTS="-Xms1303m -Xmx1303m <parameter>-Xdebug</parameter>
-XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true
-Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
+ JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS
-Djava.awt.headless=true"
+ JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
+else
+ echo "JAVA_OPTS already set in environment; overriding default settings with
values: $JAVA_OPTS"
fi</programlisting>
-<para>
-Please note that the memory settings in the above example have been changed from the
default.
+ </step>
+ <step>
+ <para>
+Start the portal as normal by executing the following command:
</para>
-</step>
-Metadata:
-Source URL:
http://www.coderanch.com/t/90611/JBoss/Running-JBoss-Debug-mode
-http://community.jboss.org/thread/78131
-http://stackoverflow.com/questions/1891053/how-to-run-jboss-4-2-3-in-the-debug-mode-eom
-Source Author: [the name of the original author - add as many as necessary
-Source Author email: [source author email, match up name and email pairs please
-Source License: [the license of the original material*]
-<step>
-<para>
-Start the portal as normal:
-</para>
-<programlisting><command>[<replaceable>USER</replaceable>@<replaceable>HOST</replaceable>
<replaceable>JBOSS_AS</replaceable>]$ ./bin/run.sh [-c
<replaceable>PROFILE]</replaceable></command>
+
<programlisting><command>[<replaceable>USER</replaceable>@<replaceable>HOST</replaceable>
jboss-jpp-6.0]$ ./bin/standalone.sh </command>
</programlisting>
-</step>
-</procedure>
-<procedure>
-<title>Setting the Magic Locale</title>
-<step>
-<para>
-<emphasis role="bold">I have no idea how to do this. And no amount of
Googling is revealing anything...</emphasis>
+ </step>
+ </procedure>
+ <procedure>
+ <title>Setting the Magic Locale</title>
+ <step>
+ <para>
+Open <ulink url="http://localhost:8080/portal/classic"/> to display the
Portal Platform landing page.
</para>
-</step>
-</procedure>
-<para>
-This feature translates a key to the same key value.
-</para>
-<para>
-For example, the translated value for the key
"<parameter>organization.title</parameter>" is simply the value
"<parameter>organization.title</parameter>". Selecting that language
allows use of the portal and its applications with all the keys visible. This makes it
easier to find out the correct key for a given label in the portal page.
-</para>
-</section> --> </section>
+ </step>
+ <step>
+ <para>Click <guibutton>Change
Language</guibutton>.</para>
+ </step>
+ <step>
+ <para>Select <guimenuitem>Magic locale</guimenuitem> from the
list of available languages.</para>
+ </step>
+ </procedure>
+ </section>
+ <section>
+ <title>Translate the Language Selection Form</title>
+ <figure>
+ <title>Language Selection Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
fileref="images/PortalDevelopment/Internationalization/LanguageChoice.png"/>
+ </imageobject>
+ <caption>Image displaying the available languages in the portal, with
French selected.</caption>
+ </mediaobject>
+ </figure>
+ <para>
+
+
+ When choosing a language from the Language Select screen, the user is presented
with a list of languages on the left side in the current chosen language. On the right
side, the same language is translated into its own language. </para>
+ <para>The local language values are obtained from the JDK API
+ <code>java.util.Locale.getDisplayedLanguage()</code>
+ and
+ <code>java.util.Locale.getDisplayedCountry()</code>
+ (if needed). Not all languages may be translated, and the languages
available can also depend on the JVM currently used. </para>
+ <para>It is possible to override these values by editing the
+ <code>locale.portal.webui</code>
+ resource bundle. </para>
+ <procedure>
+ <title>Overriding Default JDK API Language Values</title>
+ <step>
+ <para>Edit the
+
<code>gatein.ear/portal.war/WEB-INF/classes/locale/portal/webui_<replaceable>xx_yy</replaceable>.properties</code>
+ file where
+ <replaceable role="italics">xx_yy</replaceable>
+ represents the country code of the language you wish to translate.
</para>
+ </step>
+ <step>
+ <para>In that file, add or modify a key such as
+ <code>Locale.<replaceable>xx_yy</replaceable></code>
+ with the <replaceable>xx_yy</replaceable> value being the
translated string.
+ </para>
+ </step>
+ <step>
+ <para>Edit
+
<code>gatein.ear/portal.war/WEB-INF/classes/locale/portal/webui_fr.properties</code>
+ where
+ <emphasis role="italics">fr</emphasis>
+ is the country code for French, and add the following key into it:
+ </para>
+ <programlisting>Locale.zh_TW=Chinois traditionnel</programlisting>
+ </step>
+ </procedure>
+ <para>When the portal is next restarted, the localized language will be
updated in the user interface when a user tries to change the current language.
+ </para>
+ </section>
+ </section>
</chapter>