You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have an app with one base component and other 2 components which are lazy loaded the translateService.use function doesn't make the request to retrieve translation files.
Expected behavior
It should retrieve the translation files for each lazy loaded modules.
How do you think that we should fix this?
The issue is caused by this line:
// don't change the language if the language given is already selectedif(lang===this.currentLang){returnof(this.translations[lang]);}
I'm not sure what would happen if the check is removed, but my first guess is to remove it. :)
Minimal reproduction of the problem with instructions
Nothing should happen if you remove the check, it'll just load the translations again if you call translateService.use. Maybe there should be an additional check, to see what context you're in
Current behavior
If you have an app with one base component and other 2 components which are lazy loaded the
translateService.use
function doesn't make the request to retrieve translation files.Expected behavior
It should retrieve the translation files for each lazy loaded modules.
How do you think that we should fix this?
The issue is caused by this line:
I'm not sure what would happen if the check is removed, but my first guess is to remove it. :)
Minimal reproduction of the problem with instructions
Here's a stackblitz demonstrating the issue: https://stackblitz.com/edit/angular-sm99qe-ngx-translate-lazy-load
Environment
The text was updated successfully, but these errors were encountered: