[Qt-interest] javascript and locale?
Frank Hemer
frank at hemer.org
Wed Oct 12 12:27:21 CEST 2011
On Wednesday 12 October 2011 05:05:36 Girish Ramakrishnan wrote:
> On Tue, Oct 11, 2011 at 10:55 PM, Frank Hemer <frank at hemer.org> wrote:
> > Hello,
> >
> > I'm trying to use toLocaleString () javascript methods (for i.e. Date)
> > but cannot find howto setup the locale.
> > QLocale::setDefault (...) seems not to have any effect, only on linux the
> > system locale itself seems to affect the result.
> >
> > Is this not supported or maybe a bug?
>
> Before I start, don't take this is a definitive answer :-)
>
> I think it's not supported. AFAICT, QLocale and QtScript's locale
> stuff don't tie into each other in any way. Have you tried calling
> setlocale() directly? I also see that Number.toLocaleString() appears
> to be unimplemented in JSC (it has a FIXME...)
Well, thats what I tried so far. Setting the locale via environment works fine
regarding the Date.toLocaleString () - but as you have mentioned,
Number.toLocaleString () does nothing. Seems like I have to implement my own
workaround:-(
However thanks:-) for the info - I'll file a bug report.
Frank
More information about the Qt-interest-old
mailing list