formatting numbers, decimal divider

View: New views
5 Messages — Rating Filter:   Alert me  

formatting numbers, decimal divider

by Jürgen Herz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello!

I'm writing an extension in which some numbers are output. But in some
countries the decimal divider is a comma, in others a point. Is there
a standard way to get numbers formatted according to the browser
locale?

Regards,
Juergen
_______________________________________________
dev-i18n mailing list
dev-i18n@...
https://lists.mozilla.org/listinfo/dev-i18n

Parent Message unknown Re: formatting numbers, decimal divider

by Axel Hecht :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jürgen Herz wrote:
> Hello!
>
> I'm writing an extension in which some numbers are output. But in some
> countries the decimal divider is a comma, in others a point. Is there
> a standard way to get numbers formatted according to the browser
> locale?
>
> Regards,
> Juergen

new Number() and then toLocaleString() uses the OS locale, that's not
really what you want, I guess?

Axel
_______________________________________________
dev-i18n mailing list
dev-i18n@...
https://lists.mozilla.org/listinfo/dev-i18n

Re: formatting numbers, decimal divider

by Jürgen Herz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/7/1, Axel Hecht <l10n@...>:

> new Number() and then toLocaleString() uses the OS locale, that's not
>  really what you want, I guess?

Not really, though it's likely OS and users language are the same.

Thanks,
Juergen
_______________________________________________
dev-i18n mailing list
dev-i18n@...
https://lists.mozilla.org/listinfo/dev-i18n

Parent Message unknown Re: formatting numbers, decimal divider

by Rimas Kudelis-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jürgen Herz rašė:
> 2008/7/1, Axel Hecht <l10n@...>:
>
>> new Number() and then toLocaleString() uses the OS locale, that's not
>>  really what you want, I guess?
>
> Not really, though it's likely OS and users language are the same.

You're unlucky then, cause even Firefox 3.0 still doesn't do it. Check
https://bugzilla.mozilla.org/show_bug.cgi?id=161116 .

RQ
_______________________________________________
dev-i18n mailing list
dev-i18n@...
https://lists.mozilla.org/listinfo/dev-i18n

Re: formatting numbers, decimal divider

by Jürgen Herz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/7/4 Rimas Kudelis <rq@...>:
>> Not really, though it's likely OS and users language are the same.
>
> You're unlucky then, cause even Firefox 3.0 still doesn't do it. Check
> https://bugzilla.mozilla.org/show_bug.cgi?id=161116 .

Ok. Thanks for the bug #.

Juergen
_______________________________________________
dev-i18n mailing list
dev-i18n@...
https://lists.mozilla.org/listinfo/dev-i18n