Releases: robisim74/angular-l10n
Releases · robisim74/angular-l10n
v17.0.1
v17.0.0
v16.0.0
Features
-
Angular version: ^16.0.0
-
Add
provideL10n*functions to support standalone apps
BREAKING CHANGES
- Change
L10nResolvetoresolveL10nfunction for lazy loading - Change
L10nUserLanguagetoL10nLocaleResolver - Remove
L10nRoutingModule: create a localized routing
v15.0.0
v14.0.0
Features
-
Angular version: ^14.0.0
-
Add
l10nPlural&l10nDisplayNamesdirectives -
l10nPluralpipe & directive now pass the value as parameter to translation
BREAKING CHANGES
l10nDateAsync&l10nNumberAsynchave a different signature:languageparameter was moved to the end
Notes
- To use pipes & directives in standalone components (in dev preview), you have to import
L10nTranslationModuleorL10nIntlModule(depending on the pipes and directives you need). When standalone components will be stable, also pipe & directives of this library will be standalone, and you will be able to import them individually as well as through ng modules.
v13.1.0
v13.0.0
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_INITIALIZERis now included inforRootofL10nTranslationModule- Add Unit identifiers in
L10nLocale - Add optional convert function as parameter to
l10nNumberpipe and directive - Directives now support strictTemplate
BREAKING CHANGES
- Make sure to have in your
tsconfig:
"lib": [
"es2020",
"dom"
]
- You can remove
initL10nfrom providers inAppModule:
// No longer needed
providers: [
{
provide: APP_INITIALIZER,
useFactory: initL10n,
deps: [L10nLoader],
multi: true
}
],
- If you are calling
loadTranslationpassing 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}]);