0

I declare a httpLoaderFactory in my app module as follows

export function HttpLoaderFactory(httpBackend: HttpBackend) {
    return new MultiTranslateHttpLoader(httpBackend, [
        {prefix: './somepath/', suffix: '.json'}
    ]);
}

and the translate module is imported as follows

 TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: HttpLoaderFactory,
        deps: [HttpBackend]
      },
      isolate: false,
      extend: true
    }),

In all other modules it is imported using forChild. When another module (which is not the app.module) attempts import a third module which also has its own translation files to load, they are not loaded.

Has anyone found a way to load translations per module and have them always work? Even if the module is not loaded in the app.module?

0 Answers0