@ngneat/transloco that uses
messageformat.js to compile translations using ICU syntax for handling pluralization and gender.
Messageformat is a mechanism for handling both pluralization and gender in your app.
You can see its format guide here.
MessageFormatTranspiler is compatible with the
DefaultTranspiler and therefore you can switch without worry that it will break your current translations.
It then enables support for the following within youIt enables support for the following within your i18n translation files:
To enable this plugin, add the following import in your
By default, messageformat initializes all locales. You could also provide the locales you will need:
The value for
locales is either a string or an array of strings. The first locale is used as the default locale by messageformat. More info here.
MessageFormat instances provide some methods to influence its behaviour, among them
setStrictNumberSign. Learn about their meaning here
This is how you would enable bi-directional support and add a custom formatter, for example: