From: <jbo...@li...> - 2005-11-20 15:39:23
|
Author: aron.gombas Date: 2005-11-20 10:39:09 -0500 (Sun, 20 Nov 2005) New Revision: 1608 Modified: trunk/labs/kosmos/xdocs/reference/reference-manual.xml Log: Serverside locale setting added to the manual Modified: trunk/labs/kosmos/xdocs/reference/reference-manual.xml =================================================================== --- trunk/labs/kosmos/xdocs/reference/reference-manual.xml 2005-11-20 15:21:25 UTC (rev 1607) +++ trunk/labs/kosmos/xdocs/reference/reference-manual.xml 2005-11-20 15:39:09 UTC (rev 1608) @@ -1538,29 +1538,60 @@ <title>I18n</title> - <para>The server component is completely locale-agnostic, you - don't have to do anything there.</para> + <para>Setting the preferred language for the whole application is a + two-step process: + + <itemizedlist> - <para> + <listitem> + <para> + For the server component, you have to set the context parameter + called <literal>locale</literal> in its <filename>web.xml</filename>: + <programlisting><context-param> + <param-name>locale</param-name> + <param-value><emphasis>en</emphasis></param-value> +</context-param></programlisting> + This setting will affect mostly the labels on the chart images, + as these are the only resources generated by the server component + that are language-dependent. + </para> + </listitem> - Setting the preferred locale is simply a change in the - <filename>web.xml</filename> - of the portlet module. You just have to change the - context-param which configures the JSTL library: - <programlisting><context-param> + <listitem> + <para> + For the portlets, you have to set the context parameter + which configures the JSTL library in the portlet module + <filename>web.xml</filename>: + <programlisting><context-param> <param-name>javax.servlet.jsp.jstl.fmt.locale</param-name> <param-value><emphasis>en</emphasis></param-value> </context-param></programlisting> - This parameter accepts the standard Java locale signs as value, + This setting will specify the language for the whole + web-based user interface. + </para> + </listitem> + + </itemizedlist> + </para> + <para> + Both these parameters accept the standard Java locale signs as value, but please make sure that the property file of the selected language is available in your distribution. At the moment, the - supported locales are: English ( - <literal>en</literal> - ) and Hungarian ( - <literal>hu</literal> - ). + supported locales are: English (<literal>en</literal> + ) and Hungarian (<literal>hu</literal>). </para> - + + <para> + For advanced users: as you see, one server supports only one language + set, which is absolutely sufficient in most of the cases. A + multi-language server would require a more complicated caching + mechanism (some parts of the content are language-independent thus + could be shared between client requests with different locale + settings, while others are not), which is necessary only in some + infrequent environments. As workaround, for two languages you can + launch two separate Kosmos servers with different language settings. + </para> + </section> </chapter> |