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:28:55 GMT
Just a follow up, as I believe I more clearly understand what Nacho is saying:

[ some lines omitted for brevity ]


> >    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? 
> 
> 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.

So, if I understand that explicitly setting the Locale on the URL can
be a means of overriding the Locale present on the HttpServletRequest,
this now introduces some ambiguities:

	. assume the URL is
	
		http://<site>/<locale>/resource
		
this would work if the 'resource' is just an HTML or GIF. However, if
the initial login page of the corporate website is via a servlet on a specific
context, then the <locale> gets in the way of determining the context.

I don't see an easy way of overriding the browser's locale other than
allowing it on the application itself. That is, if for example, the 
application's login page allows to set a persistent non-default locale
that could be preserved as part of the session associated.

Thoughts ?

Opinions ?

Arieh

> 
> 
> >    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

--
 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