"Matthew Koranda" <[EMAIL PROTECTED]> writes:

> How is it possible to make localization based on choices rather that
> http headers. I've looked into the LocalizationTool and the
> TurbineLocalizationService but the all seem to rely on either
> headers, or settings in the turbine.properties file.  I want users
> to be able to select the language they want on the page reguardless
> of their browser settings. I would lie their language preference to
> be saved in session. I can't see any methods that could just let me
> do something like:
>
> Localization.setLocale("se");
>
> Am I missing something?

I'd say you're missing the TODO in the header JavaDoc of
LocalizationTool:

 * <p><ul>Enhancement(s) suggested by Daniel Rall and Jacopo
 * Cappellato &lt;[EMAIL PROTECTED]>:
 *
 * <li><ol>Add Language negotiation overrides the following order
 * <li>user temporary language</li>
 * <li>user permanent language</li>
 * <li>application context language</li>
 * <li>automatic language negotiation (already supported)</li>
 * </ol></li>

<http://cvs.apache.org/viewcvs/jakarta-turbine-3/src/tool/org/apache/turbine/tool/LocalizationTool.java?rev=1&content-type=text/vnd.viewcvs-markup>

You can either sub-class LocalizationTool/TurbineLocalizationService,
or patch the API to take a Locale.  The latter would be much
appreciated, and would be committed immediately.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to