tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@Central.Sun.COM>
Subject RE: Localization and DefaultServlet
Date Fri, 16 Jun 2000 21:03:11 GMT
Que tal Nacho,

> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> X-No-Archive: yes
> list-help: <mailto:tomcat-dev-help@jakarta.apache.org>
> list-unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> list-post: <mailto:tomcat-dev@jakarta.apache.org>
> Delivered-To: mailing list tomcat-dev@jakarta.apache.org
> From: Nacho <nacho@siapi.es>
> To: "'tomcat-dev@jakarta.apache.org'" <tomcat-dev@jakarta.apache.org>, "'Arieh

Markel'" <Arieh.Markel@central.sun.com>
> Subject: RE: Localization and DefaultServlet
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> Hola Arieh:
> 
> > web-resources (html files, images, etc).
> > 
> > Perhaps the topic has been already discussed. If so, apologies.
> >
> 
> Great i've take some little measures in this way but is good to see some
> more people thinking in i18n and l10n issues.
>  
> > I would like to get input as far as the applicability of the proposal
> > I am about to make.
> > 
> > So here it is:
> > 
> > . modify DefaultServlet to operate in a manner similar to 
> >   ResourceBundle.getBundle (resource, Locale)
> >   
> >   so that when a document path is looked up, the Locale is factored in
> >   the calculation of the real path to the resource
> >   
> >   example:
> >   
> >   	request:		http://bar.com/resource.html
> >   	requestLocale:		en_US
> > 	defaultserverLocale:  	fr_FR
> > 	
> > 	DocumentRoot:		/dir/docRoot/
> > 	
> >    DefaultServlet would try to locate the resource.html file in an
> >    appropriately localized subdirectory off DocumentRoot in 
> > the following
> 
> What about supercede the locale that the browser has configured? 

The only things I thought we could rely on was the Locale that appears
on the HttpServletRequest.

It is not clear to me what would be an alternative method of associating
a Locale.

So, for example, in Netscape, I see that View->Character Set does not
effectively set the Locale for subsequent requests.

However, setting it on Edit->Preferences->Navigator->Languages does it:
i.e. there is no need to change the locale of the whole system, only of the
browser.

Is there any other solution ?

Thanks,

Arieh


> 
> think when i visit a webcafe in new-york and want to access my company's
> pages i dont want to see it in the locale the browser has configured i
> want to view my pages in my own language regardless of the locale
> browser, or for case netdevice , has configured.
> 
> 
> >    order:
> >    
> >    	1. /dir/docRoot/en_US/resource.html
> >    	2. /dir/docRoot/en/resource.html
> >    	3. /dir/docRoot/fr_FR/resource.html
> >    	4. /dir/docRoot/fr/resource.html
> >    	5. /dir/docRoot/resource.html
> >    	
> > The advantage of the approach is that the hypertext links 
> > (HREF in the 
> > documents) request no localization. 
> 
> Like any other may do, i think 
> 
> > 
> > A disadvantage is that there is more work to do for every request.
> > Also, that there is valid direct access to the localized resource.
> > 
> 
> i see no problem in have direct access to the whole site, think in the
> above example, it gives a way to supercede the locale, i think
> 
> > Another disadvantage is that it forces to lay out the files 
> > in a specific 
> > manner.
> > 
> 
> 
> > (I would add that it would have been possible to include the 
> > 'locale' string
> > as part of the basename of the file - i.e. 
> > /dir/docRoot/resource_en_US.html,
> > however, the manipulation of the concatenated strings makes it more
> > complicated in my opinion).
> > 
> 
> 
> no less than the average already made :-)
> 
> 
> Saludos ,
> Ignacio J. Ortega
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Mime
View raw message