New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken translation when using setTranslation in dynamic component #834
Comments
Added related question in SO: |
It has nothing to do with dynamic component. Seems you have to wait till json file is loaded. Otherwise your dynamic translations will be overrided.
https://stackblitz.com/edit/github-1ujje5-8bya2x?file=src/app/app.component.ts |
@alexzuza Thank you! I never thought they would be overridden that way around. |
I found another issue, this time I swapped I updated the stackblitz: https://stackblitz.com/edit/github-1ujje5-sugj8h |
I'm submitting a ... (check one with "x")
Current behavior
When defining translations in dynamically loaded component some of the translations do not work. In the provided stackblitz either en, fr or both translations are missing depending on how the .defaultLang and .use are called.
Expected/desired behavior
I want a dynamically loadable component that would define its own translations. Also, the language change event from main application should reach the dynamic component.
Reproduction of the problem
https://stackblitz.com/edit/github-1ujje5
ngx-translate version: 10.0.0
Angular version: 6.0.0-rc.0 / 5.2.x in my application
Browser: [all]
The text was updated successfully, but these errors were encountered: