how to implement ngx translate in a nested lazy loaded module(App Module->(Module 1->(Module 2)))

Viewed 294

enter image description here

I have been trying to implement ngx translation in the nested lazyloaded module, but have not been able to do so. The only issue I'm facing is that the language doesn't change in the nested lazyloaded module whenever I change it through the selector. HttpLoader is working fine, everything else is working fine. The code is an entire project. I wish I could post the code as well. Can someone refer me to helpful material about implementing ngx translation in a nested lazyloaded module

1 Answers

In your nested lazy-loaded module, import the TranslateModule with the extend option, to allow the module to get the translation from the first lazy-loaded module.

You can do that like the following:

imports: [TranslateModule.forChild({ extend: true })]
Related