trophy-place / community

Public repository for community additions to trophy.place
https://my.trophy.place
1 stars 0 forks source link

Localize numbers based on User language using <Number>.toLocaleString() #9

Closed TheYuriG closed 1 year ago

TheYuriG commented 1 year ago

Different countries parse large and small numbers differently, placing the , and . in a different order. It's not worth it to manually assign those numbers for each use-case, but Javascript provides an easy way for that to be displayed for every user correctly by using <Number>.toLocaleString(languageVariable).

We need to apply this to every number (not string!) input received, so that they always display correct for users based on their chosen language. Special places that require attention:

TheYuriG commented 1 year ago

Created a PR to address this: Localize numbers based on User language.

This issue will be closed once that PR is merged.