Intl.js icon indicating copy to clipboard operation
Intl.js copied to clipboard

Override local-data properties

Open ifours opened this issue 9 years ago • 1 comments

Some old mobile devices cannot show '₽' because they lack corresponding glyph in their system font. Before 1.2.5 patch (to be honest, it shouldn't be a patch release) we have used following workaround for this problem:

import en from 'intl/locale-data/json/en';

if (hasRubleSign) {
  en.number.currencies.RUB = '₽';
} else {
  en.number.currencies.RUB = 'RUB';
}

Intl.__addLocaleData(en);

So, how can I override some local-data properties for language?

ifours avatar Oct 06 '16 13:10 ifours

This is related to https://github.com/andyearnshaw/Intl.js/issues/218, hopefully we can come up with a solution that allow you to intercept and mutate the data somehow.

caridy avatar Oct 11 '16 21:10 caridy