lephyrus / ngx-translate-messageformat-compiler

Advanced pluralization (and more) for ngx-translate, using standard ICU syntax which is compiled with the help of messageformat.js.
MIT License
93 stars 30 forks source link

Formats that require Intl (date, time...) cannot be used #16

Closed imaspeer closed 6 years ago

imaspeer commented 6 years ago

MessageFormat requires calling setIntlSupport(true) before the date, time, and number formats can be used. Currently the translate compiler does not call this function and does not expose it, which makes it impossible to use the aforementioned formats.

Possible solutions :

lephyrus commented 6 years ago

I've never needed this, but it seems useful. 👍 I've just released a new version with support for some options (see README), among them setIntlSupport and setBiDiSupport. I have not added a way of adding formatters, because I overlooked that in your issue until now, to be honest. Do you have a need for custom formatters?