On 04/13/2010 08:58 AM, ReHa wrote:
> 
> Hello,
> 
> i tried the following test to use getDateFormat() in Qooxdoo 1.0.1, but the
> result is always the same - the locale-Parameter seems to have no effect:
> 
> Code: 
> qx.locale.Manager.getInstance().setLocale("de");
> this.debug("de: " + qx.locale.Date.getDateFormat("medium", "de"));
> this.debug("en: " + qx.locale.Date.getDateFormat("medium", "en"));
> qx.locale.Manager.getInstance().setLocale("en");
> this.debug("de: " + qx.locale.Date.getDateFormat("medium", "de"));
> this.debug("en: " + qx.locale.Date.getDateFormat("medium", "en"));
> 
> Debug-Result:
> de: MMM d, y
> en: MMM d, y
> de: MMM d, y
> en: MMM d, y

For one thing, if you are supplying the locale parameter to
getDateFormat(), it overrules the locale set with setLocale(), so you
can leave out the calls to setLocale().

Secondly, getDateFormat() can only return formats of language codes
which are compiled into the application (ie. the language codes you have
given in the LOCALES macro in your config.json). If the language, like
"de", is not known in this way, getDateFormat() returns the format of
the default language, which is "en". This explains why you get the same
format string in all four cases.

T.


> 
> What's wrong? Is this a bug? 
> Thanks for any help.
> ReHa

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to