javascript - Numbers: any way to determine the locale? -
this question has reply here:
with browser, how know decimal separator client use? 10 answersi have script scans web pages applies formatting numbers. illustration if finds number bigger 50000 applies reddish background.
the script works fine in languages utilize dot decimal separator (for illustration english language 12,345.67 interpreted 12345.67), fails in languages utilize comma decimal separator (french 1,234 interpreted 1234 instead of 1.234).
my question: there way observe web page locale, , interpret number accordingly?
you can take shot on getting html lang
property, there still many webpages missing attribute
javascript html locale number-formatting
No comments:
Post a Comment