It seems to me that javascript’s number toLocaleString() and .NET ToString() format numbers differently. toLocaleString() seems to ignore the language I set in Tools/Internet Options/Languages.
For example, to test spanish support I made sure only Spanish (es-ES) is listed in Tools/Internet Options/Languages but
alert((12.05).toLocaleString()); still shows “12.05” (instead of 12,05)
The Accepted-Language in the header shows es-ES but navigator.userLanguage in javascript still says “en-US” (as if it were picked from the OS)
What I am missing here?
You are not missing anything.
toLocaleStringgets the current locale from the operating system.edit in response to comment
That browser setting tells the server what language(s) you prefer. It has no effect on javascript, however. And if you think about it that makes perfect sense. Asking the server for content in a particular language is no guarantee that the server will actually return content in that language.
But it sounds to me like you don’t really have a problem, you were just confused about how to test properly. Can’t you just change the OS language settings to ensure that the date is properly formatted for Spanish speakers?