jetspeed  

Re: NLS in Jetspeed

Santiago Gala
Wed, 28 Feb 2001 11:10:38 -0800

ingo schuster escribió:
> 
> I'd like to improve the national language support in Jetspeed. The idea is
> pretty simple:
> 
> * We write a set of templates for each language.
> * The templates are moved into respective subdirectories (e.g.
> templates/jsp/en/{layouts,navigations,screens} for JSP templating and
> english language).
> * The JetspeedSesionValidator adds the language to the user's TempStore.
> This could be the user agent's preferred language and as a fallback the
> locale.default.language setting in TR.p.
> * The template system is modified to use the user.getTemp("locale") for
> searching the templates in the respective subdirectory (I think subclassing
> the TurbineTemplateService is the easiest way of doing this). We can have a
> set of default templates that'll be choosen if the language specific
> template directories don't contain the requested template. (E.g.  for the
> Ecs screen template, as this it 100% language independent)
> 
> Comments, want me to develop this (Shouldn't take too long ;-))?
> 

We have similar code. Also, the Profiler has this code for retrieving
the psml.

We should possibly unify this code (there are already comments in
Profiler pointing
to the use of language to select psml).

Also, don't forget it is lang_COUNTRY, as in de, de_AT, de_CH, de_DE
(jre even has a de_DE_EURO).

I think the approach should be having 

default
(files here)
    lang
    (files here maybe)
        COUNTRY
        (files here maybe)
...

The schema for psml is user/mime_type or group/mime_type or
default/mime_type
Our schema for skins is lang/mime_type/browser/version/theme

I think we should unify this code under the Profiler Service, to have a
method that,
given a CapabilityMap/RunData, a "kind_of_resource" and a name, returns
the resource going to
the leaves and falling back if it does not exist.

We could have configurable variations on resources, like:

templates.jsp.variations=jlang,jcountry
psml.variations=juser
skin.variations=mimeType,browser,browserVersion,theme
jlang.variation=language
jcountry.variation=country
juser.variation=user
...

And the code would call getCountry (a la bean) and use the returned
property to do the search,
using the ordering of the variations to do a depth first search with
fallback.

This last idea is highly speculative, maybe it is better to have
different
Profiles for different variations of the idea.

(You asked for comments, so don't protest now :-)


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/jetspeed@list.working-dogs.com/>
List Help?:          [EMAIL PROTECTED]