cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Lutz <>
Subject Re: Locale Bug in CForm ?
Date Thu, 11 Aug 2005 12:55:15 GMT
Leszek Gawron wrote:

> Thomas Lutz wrote:
>> private Locale locale = Locale.getDefault();
>> It takes the default locale from the host, but shouldn't it take the 
>> locale set via the browser or the ? So the line 
>> should rather be something like:
>> private Locale locale = I18nUtils.findLocale(....); ?
> in your own cocoon webapp you can do:
> var form = new Form( "cocoon:/form-def/" + config.filterModelName );
> form.locale = determineLocale();
> and implement determineLocale() with any logic you like.
> For cocoon samples: we should probably make use of LocaleAction.
I tried to do this in javaflow (as I only use java as flow script 
language), that's not that easy. has no setter for it's 
member locale, and locale is private... so no chance of tweaking in ?

What's the reason for Locale.getDefault() ? At least I would expect to 
behave forms like all other I18N components, and take the locale from 
the user agent, so dates and whatsoever get a proper formatting in the 
forms... or am I missing something ?

Thanks for the quick answer,

View raw message