Features
- Angular version: ^13.0.0
- Now that angular has removed IE support, Intl is fully supported and you should no longer need polyfills
APP_INITIALIZER
is now included in forRoot
of L10nTranslationModule
- Add Unit identifiers in
L10nLocale
- Add optional convert function as parameter to
l10nNumber
pipe and directive
- Directives now support strictTemplate
BREAKING CHANGES
- Make sure to have in your
tsconfig
:
"lib": [
"es2020",
"dom"
]
- You can remove
initL10n
from providers in AppModule
:
// No longer needed
providers: [
{
provide: APP_INITIALIZER,
useFactory: initL10n,
deps: [L10nLoader],
multi: true
}
],
- If you are calling
loadTranslation
passing new providers, now you need to add them to the configuration first:
const i18nLazyAsset = { 'en-US': {...}, 'it-IT': {...} };
this.translation.addProviders([{ name: 'lazy', asset: i18nLazyAsset}]);
this.translation.loadTranslation([{ name: 'lazy', asset: i18nLazyAsset}]);