0

I've added the @ngx-translate/core, inside a http-request I get dropdown values. Those values are then added to a translation language object using the method:

translate.setTranslation('en', {
  HELLO: 'hello {{value}}'
});

Is there any way to merge this newly created object with the originally loaded translations. I'm using the provided custom loader, is there a way to reuse it to load new translations.

export function createTranslateLoader(http: HttpClient) {
    return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}
alphapilgrim
  • 3,761
  • 8
  • 29
  • 58
  • You can use an interceptor to intercept the response , Modify/ append data and use it. Or you can create a customer loader for the same – Vikas Oct 16 '19 at 15:35
  • @Vikas I'm using the provided custom loader, is there any way to use it to merge the new translations into the asset file previously loaded? – alphapilgrim Oct 16 '19 at 15:52

0 Answers0