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
I've been struggling to set up ngx-translate with lazy-loading. In our application we don't need to create a separate translations file per module as the overall language file is not very big. We just want to use the same en.json for all modules.
I've started implementing lazy-loading. The original issue was that translations didn't work in lazy-loaded modules. Then I came up with a solution - to instantiate and configure TranslateService in a SharedModule (as I described here).
Now there is another problem I've noticed - this en.json file is loaded all over again for each lazy-loaded module. I've been trying out lots of different configurations. And for any of them - either translations are not shown (empty) or en.json is loaded multiple times.
I've been struggling to set up ngx-translate with lazy-loading. In our application we don't need to create a separate translations file per module as the overall language file is not very big. We just want to use the same en.json for all modules.
I've started implementing lazy-loading. The original issue was that translations didn't work in lazy-loaded modules. Then I came up with a solution - to instantiate and configure TranslateService in a SharedModule (as I described here).
Now there is another problem I've noticed - this en.json file is loaded all over again for each lazy-loaded module. I've been trying out lots of different configurations. And for any of them - either translations are not shown (empty) or en.json is loaded multiple times.
Can anyone suggest a solution to this? Thank you.
Angular Version: 6.0.6
Ngx-translate Version: 10.0.2
@ngx-translate/http-loader: 3.0.1
The text was updated successfully, but these errors were encountered: