formatting numbers, decimal divider

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

formatting numbers, decimal divider

Jürgen Herz-2
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
[hidden email]
https://lists.mozilla.org/listinfo/dev-i18n
Reply | Threaded
Open this post in threaded view
|

Re: formatting numbers, decimal divider

Axel Hecht
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
[hidden email]
https://lists.mozilla.org/listinfo/dev-i18n
Reply | Threaded
Open this post in threaded view
|

Re: formatting numbers, decimal divider

Jürgen Herz-2
2008/7/1, Axel Hecht <[hidden email]>:

> 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
[hidden email]
https://lists.mozilla.org/listinfo/dev-i18n
Reply | Threaded
Open this post in threaded view
|

Re: formatting numbers, decimal divider

Rimas Kudelis-2
In reply to this post by Axel Hecht
Jürgen Herz rašė:
> 2008/7/1, Axel Hecht <[hidden email]>:
>
>> 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
[hidden email]
https://lists.mozilla.org/listinfo/dev-i18n
Reply | Threaded
Open this post in threaded view
|

Re: formatting numbers, decimal divider

Jürgen Herz-2
2008/7/4 Rimas Kudelis <[hidden email]>:
>> 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
[hidden email]
https://lists.mozilla.org/listinfo/dev-i18n