How to use the angular-l10n.L10nTranslationModule.forRoot function in angular-l10n

To help you get started, we’ve selected a few angular-l10n examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github robisim74 / angular-l10n / projects / angular-l10n-app / src / app / app.module.ts View on Github external
@NgModule({
    declarations: [
        AppComponent,
        HomeComponent,
        PipeComponent,
        DirectiveComponent,
        ApiComponent,
        ValidationComponent,
        OnPushComponent
    ],
    imports: [
        BrowserModule,
        FormsModule,
        AppRoutingModule,
        HttpClientModule,
        L10nTranslationModule.forRoot(
            l10nConfig,
            {
                storage: AppStorage,
                translationLoader: HttpTranslationLoader
            }
        ),
        L10nIntlModule,
        L10nValidationModule.forRoot({ validation: LocaleValidation }),
        L10nRoutingModule.forRoot()
    ],
    providers: [
        {
            provide: APP_INITIALIZER,
            useFactory: initL10n,
            deps: [L10nLoader],
            multi: true