Uploaded image for project: 'MusicBrainz Server'
  1. MusicBrainz Server
  2. MBS-4118

Date/Number.toLocaleString always uses English

XMLWordPrintable

      While the original issue with this ticket was mostly fixed in theory, toLocaleString is not returning the strings as it should based on different locales.

      Original content:

      See http://git.musicbrainz.org/gitweb/?p=musicbrainz-server.git;a=blob;f=root/components/common-macros.tt;h=8a481f318fcbf89f5a27587a90a12645220d331a;hb=HEAD#l8

      Right now, we simply use a full stop for all decimal points and a comma for all thousands separators. At the very least, we need to support different characters for decimal points (a comma is used by pretty much everyone in mainland Europe and South America) and characters other than a comma for thousands grouping.

      For proper support, we would need something more advanced that doesn't expect numbers to be grouped in threes, e.g. see the information about India on http://en.wikipedia.org/wiki/Decimal_mark CLDR would probably have the information we need.

            reosarevok Nicolás Tamargo
            nikki nikki
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2020-10-05