Sets a new locale to the locale service and also to the translate service. Throws An error if the new value is not configured in the available locales or if the new locale cannot be saved, an error is thrown.
Emits to indicate that the localization package (e.g. @angular/common/locales/${localeId}) is loaded and registered. Emits after calling localeInitializer from the config object.
The default locale to be used, when no user preference available and the browser language is not part of the available languages. defaultLocale?: string¶
Default is false and defines that on setting a new locale, the locale is stored and the browser is reloaded. When changing to true, window reload is not invoked, but angular pure pipes like DatePipe will not work. dynamicLanguageChange?: boolean¶
Set to true to also enable the default language on ngx-translate. When true, ngx-translate will use a translate value from the default language when a required value is not available in the current language. But note, this will also enforce to load the default language translation file into the application, even if a different locale is active. In other words, the application start time increases. fallbackEnabled?: boolean¶
The localeInitializer function is invoked on every locale change. Make sure to invoke registerLocaleData with the locale to enable the Angular localization. localeInitializer?: (localeId: string) => Promise<any>¶
Except where otherwise noted, content on this site is licensed under MIT License.