portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Casagrande Matteo-ACM117 <acm...@motorola.com>
Subject RE: Internationalization
Date Fri, 31 May 2002 12:32:14 GMT
Dear all,
I have solved this problem changing LocalizationTool (turbine) and adding
LocalizationHelper as suggested by Leandro
 http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg06920.html

and adding in DefaultPage (turbine)
  
protected void doBuildBeforeBeforeAction(RunData data)
        throws Exception
    {
 
if(data.getParameters().getString(LocalizationHelper.USER_LOCALE)!=null)
       {
        String localeString =
data.getParameters().getString(LocalizationHelper.USER_LOCALE);
        Locale locale =
LocalizationHelper.buildLocaleFromParameter(localeString);
        data.getSession().putValue(LocalizationHelper.USER_LOCALE, locale);
       }
    }
the action is empty but calling it we pass the locale information (ex:
ActionLocale?user.locale=it).
In this way I can change locale at "runtime" without come back to the home
page.

regards,
 matteo


> -----Original Message-----
> From: Santiago Gala [mailto:sgala@hisitech.com]
> Sent: Friday, May 31, 2002 2:05 PM
> To: Jetspeed Developers List
> Subject: Re: Internationalization
> 
> 
> Casagrande Matteo-ACM117 wrote:
> 
> >Dear all,
> >I'm trying to internationalize jetspeed 1.3.a2 by clicking flags.
> >I don't know how and what I have to set for setting a language.
> >I've tried to change the "local" (parameter 
> data.getUser().setTemp("locale",
> >locale)) from JetspeedSessionValidator but nothing changes, 
> jetspeed goes on
> >foolowing the browser setting.
> >
> The logic here is: The user (agent) rules. The browser is 
> supposed to be 
> the way where a user can select a locale.
> 
> The Profile will look for a matching page from the request.
> 
> It could be interesting to have a setting where a user could have the 
> preferred locale stored in the database (with a blank 
> default), and the 
> Login action would use the database setting first, and the 
> browser one 
> if blank, for the use case of people logging from public 
> kiosks (badly 
> configured most of the time). This would be set as part of the login 
> process.
> 
> Alternatively, a session default set in a simple way (select 
> language in 
> navigation) could be preferred over the one coming in the request for 
> the current session, and would force re-selection of profile 
> to get new 
> templates.
> 
> Are you interested in implementing one of these solutions? 
> Other people? 
> I would not mind, if they are cleanly interfaced.
> 
> >Thanks in advance,
> > matteo
> >

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message