If you are using WebMacro under Turbine you have two major choices
provided to you by the WebMacro layer for low layer localization:
1. write a localization filter using the filtering API. this gives
you an opportunity to format objects as they are being rendered
in the template: your code could check the type of the class
and invoke an appropriate formatter, or replace the object
with a different object. you get to see the locale of the user
when you execute this filter.
2. create localizable objects in your application and have them
implement the interface org.webmacro.Macro. Your objects will
then have their write() method called when they are rendered in
the template. Again you will be able to check the users locale and
write a different version of your object depending on what you
see there.
For high layer localization a useful strategy is to arrange to have a
different template returned depending on your locale. You probably
want to do this as well as some lower level solution since in a
typical application you have to deal with both the conversion of
individual strings and objects as well as differences in layout at
the page level.
Justin
On Wed, Sep 27, 2000 at 10:53:46AM +0200, Christophe Lombart wrote:
> Hi All,
>
> Is it possible to build html interface with Turbine that support
> multi-language depending of the user preference (french, english, ...).
>
> If not, what is the best design for this kind of dynamic content ?
> Maybe XML files can be used to define all translation ? what do you think
> about that ?
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
> Problems?: [EMAIL PROTECTED]
>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]