You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The number(s) shown in the diagram always uses western Arabic numerals irrespective of the user locale.
Please update the code to generate alternative numbers for users with different locales (at least for my language Persian (also called Farsi) and also Arabic 😙). Note that Persian and Arabic numerals are different from each other.
Here is an example vector that shows the number based on the user (system) locale. The SVG shows Farsi (Persian) numerals if user locale matches Farsi, otherwise falls back to the default Western numerals for all other locales (the order in <switch> element matters).
I think in JavaScript, number.toLocaleString(Locale) can be used to produce localized numbers.
The number(s) shown in the diagram always uses western Arabic numerals irrespective of the user locale.
Please update the code to generate alternative numbers for users with different locales (at least for my language Persian (also called Farsi) and also Arabic 😙). Note that Persian and Arabic numerals are different from each other.
This Wikipedia article and this can help.
Here is an example vector that shows the number based on the user (system) locale. The SVG shows Farsi (Persian) numerals if user locale matches Farsi, otherwise falls back to the default Western numerals for all other locales (the order in
<switch>
element matters).I think in JavaScript,
number.toLocaleString(Locale)
can be used to produce localized numbers.Below is an example.
index.html:
script.js:
The text was updated successfully, but these errors were encountered: