OpenRefine icon indicating copy to clipboard operation
OpenRefine copied to clipboard

Localization of number formatting

Open wetneb opened this issue 4 years ago • 5 comments

At the moment we display our numbers without formatting them according to the locale.

Proposed solution

It would be great if the locale could be taken into account when formatting numbers in most places in the UI.

For instance, instead of showing 4126530 rows, show 4,126,530 rows in English and 4 126 530 lignes in French.

Alternatives considered

None.

Additional context

It seems to me that we first need support for this feature in the underlying localization library: https://github.com/wikimedia/jquery.i18n/issues/229

wetneb avatar Jun 22 '21 13:06 wetneb

Isn't this related to one of your bullet points specifically in the older issue #2443 ?

thadguidry avatar Jun 22 '21 15:06 thadguidry

Also, I think it would be wise that we probably clarify the proposed solution with system locale and not just saying locale. I would expect as a user that if I change my system locale, that OpenRefine's UI understands and respects that change after a refresh on browser? Do-able?

thadguidry avatar Jun 22 '21 15:06 thadguidry

Since we only have frontend localization at the moment, this issue is about the frontend (but the same could be applied to the backend if we localize it eventually).

wetneb avatar Jun 22 '21 15:06 wetneb

Additional context

It seems to me that we first need support for this feature in the underlying localization library: https://github.com/wikimedia/jquery.i18n/issues/229

Does this mean we have to migrate to https://github.com/wikimedia/banana-i18n ?

elroykanye avatar Aug 08 '22 21:08 elroykanye

If they support that in banana-i18n, then I would definitely support that :)

wetneb avatar Aug 08 '22 21:08 wetneb

Since we only have frontend localization at the moment, this issue is about the frontend (but the same could be applied to the backend if we localize it eventually).

More precisely the backend / server uses the default locale of the process where the server is running. Typically this will be the default system locale. It may also be desirable to allow control of the locale used for number formatting in the toString() function, but that's not currently possible.

tfmorris avatar Oct 18 '22 22:10 tfmorris