2

I need to add Internationalization support in my JHipster generated app, for some Lazy-Loaded feature modules.

From what I found it seems to be an old problem, but since it's passed a bit of time from when the problem was first spotlighted, maybe now there is a working solution for this, which I couldn't found.

Here the related discussions:

1Z10
  • 2,801
  • 7
  • 33
  • 82
  • We recently changed the admin module to be lazy-loaded and ran into this issue. https://github.com/jhipster/generator-jhipster/issues/7307 I'm not the most familiar with i18n but the changes made to fix the admin module's lazy-loaded translations are https://github.com/ruddell/jhipster-examples/commit/535350db6ef73a065e89fe9514e8a49eb6ed0956 – Jon Ruddell May 21 '18 at 15:04
  • Hi @Ruddell thanks fro the reply. I'll give it a try and let you know what happens. – 1Z10 May 22 '18 at 07:48
  • @1Z10 did you find a solution for this problem, as I have the same issue? – Ahmed E. Eldeeb Mar 21 '19 at 12:24
  • @AhmedE.Eldeeb unlickely I did not. – 1Z10 Mar 22 '19 at 10:54

1 Answers1

1

I had the same problem in Jhipster after a long time I found the solution. Follow this GitHub linked https://github.com/ruddell/jhipster-examples/commit/535350db6ef73a065e89fe9514e8a49eb6ed0956

It was a problem in old versions in Jhipster itself, all what you need is to update your project to the latest version of Jhispter or copy the new codes in green color in this commit to your project

1- update language.helper.ts 2- load user language in your lazy module's constructor as in admin.module.ts in that commit

Ahmed E. Eldeeb
  • 395
  • 3
  • 14