tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nacho <na...@siapi.es>
Subject RE: Localization and DefaultServlet
Date Fri, 16 Jun 2000 20:38:12 GMT
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? 

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

Mime
View raw message