npm angular-l10n 13.0.0

latest releases: 16.0.0, 15.0.0, 14.0.0...
3 years ago

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}]);

Don't miss a new angular-l10n release

NewReleases is sending notifications on new releases.