incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne Jalkanen <janne.jalka...@ecyrd.com>
Subject Re: Stripes LocalePicker.Locales
Date Sun, 05 Apr 2009 18:55:16 GMT

Easier done than said - since the code already existed in Preferences,  
I just committed a custom LocalePicker ;-)

/Janne

On 5 Apr 2009, at 21:11, Janne Jalkanen wrote:

>
> Hm. Then why not just use the system from 2.8 and have a custom  
> LocalePicker just interface with that one?
>
> The order must always be user preference from cookie -> Accept- 
> Language -header -> system setting from jspwiki.properties ->  
> default English. An internal priority list is IMHO quite useless.
>
> Besides, if the user's browser sends multiple choices, they've got a  
> priority attached.  Shouldn't we use that instead of something set  
> by the server?
>
> /Janne
>
> On 5 Apr 2009, at 20:41, Andrew Jaquith wrote:
>
>> LocalePicker does some useful things. The first thing it does is  
>> inform Stripes what Locales are available. But perhaps the most  
>> important thing is that it gives the priority order of Locales in  
>> those cases where it is unclear which to use, such as when the  
>> user's browser sends multiple locales. LocalePicker provides the  
>> algorithm for resolving the correct Locale.
>>
>> Now, as far as JSPWiki is concerned, I agree keeping a separate  
>> config is confusing. It has always been my plan to write a  
>> LocalePicker implementation that uses jspwiki.properties for  
>> looking up the resolution order, AND takes the user's preference  
>> setting into account also. (If set, it should always "win".) I just  
>> haven't gotten to it yet -- pretty far down the priority list.
>>
>> Andrew
>>
>> On Apr 4, 2009, at 15:54, Janne Jalkanen <Janne.Jalkanen@ecyrd.com>  
>> wrote:
>>
>>> Heya!
>>>
>>> Why do we need LocalePicker.Locales in web.xml? That essentially  
>>> prevents people from doing dynamic addition/removal of languages  
>>> to the wiki - without it, all you need to do is to drop a suitable  
>>> JAR file in a suitable location.
>>>
>>> /Janne


Mime
View raw message