on 9/27/2000 2:07 PM, "Justin Wells" <[EMAIL PROTECTED]> wrote:
> If you are using WebMacro under Turbine you have two major choices
> provided to you by the WebMacro layer for low layer localization:
Thanks Justin, excellent help!
> 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.
Ouch. This one sounds painful for some reason.
> 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.
This one can also be combined with Turbine's LocalizationService to make
things a bit easier.
> 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.
Right. That is where we decided to go with Scarab.
-jon
--
http://scarab.tigris.org/ | http://noodle.tigris.org/
http://java.apache.org/ | http://java.apache.org/turbine/
http://www.working-dogs.com/ | http://jakarta.apache.org/velocity/
http://www.collab.net/ | http://www.sourcexchange.com/
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]