[Javascript] thousand separator

Flavio Gomes flavio at economisa.com.br
Thu Jun 3 12:54:46 CDT 2004


Flavio Gomes wrote:

> Hassan Schroeder wrote:
>
>> Shawn Milo wrote:
>>
>>> Interesting.  I didn't know that.  Well, I suppose
>>> that the user will have to take care of modifying
>>> the script in that case, because I don't know how,
>>> if it's even possible, to detect the regional values.
>>>
>>> Is that something that can be harvested from the
>>> browser somehow, as the current UTC offset can be?
>>
>>
>>
>> That's a darn good question :-)
>>
>> Locale support is slim in JS. There's obviously a private method
>> under the hood, because Date has a `toLocaleString()` method.
>>
>> In my copy of Moz (1.6), `navigator.language` gives me "en_US",
>> but Opera 7.22 just gives me "en" and IE 5.5 says "undefined".
>> However, that same IE is sending an Accept-Language header of
>> "en-us" so maybe the only reliable way to make the locale info
>> available to JS is to capture it server-side and write it into
>> a cookie to send back.
>>
>> A bit convoluted, but...
>>
>
> on IE6  = > navigator.systemLanguage = pt-br
> ^^ weeee!  Does it help?
>
> ---
> Flavio Gomes
> flavio at economisa.com.br
>
There's more info on navigator object on the attachment.
The original where from it came is htmlref.chm from Visual Studio (I 
think) but it's actually easy to find online. (google)
(Non-Windows people may try archmage or xchm to read it)

---
Flavio Gomes
flavio at economisa.com.br

-------------- next part --------------
A non-text attachment was scrubbed...
Name: navigator.zip
Type: application/octet-stream
Size: 21071 bytes
Desc: not available
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20040603/2611e046/attachment.obj>


More information about the Javascript mailing list