4

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

2
  • Have a look at the docs, check what you did not add in yet: github.com/ngx-translate/core#lazy-loaded-modules Commented Aug 17, 2021 at 7:11
  • my app is working fine for the lazyloaded module, the issue begins when I further navigate to the child nested module which is mentioned no where in the documentation Commented Aug 17, 2021 at 7:49

1 Answer 1

1

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 })]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.