-
-
Notifications
You must be signed in to change notification settings - Fork 588
setTranslate does not work #1254
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
Comments
I find up (in my situation) it is json import problem. |
Same case for me. It is intermittent. Sometimes it works, sometimes it doesn't And I'm pretty sure the second parameter always gets filled. I tried using a Custom Loader instead of manually setting and again, no luck after publishing the package and importing it at a different project angular 8, ngx-translate core 11 |
Any update on this problem? We're facing the same behaviour.
app.module
app.component
console.log outputs only translations from json file. |
Same issue but only once built, works fine in NG 12 and in serve mode. |
Turns out it was down to the translation service working in a non-singleton context and therefore loosing the translations at some point down the line 🤷♂️ |
Hi @smasala, how did you solve this problem? |
Can't remember exactly, don't have the code base anymore. I think it had to do with the dependency injection scope (provideIn). |
Could you provide a stackblitz? I'm closing the issue in the meantime, as this is an old one. Happy coding <3 |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I use
setTranslation
to add another translation, but the translate pipe does not resolve the entry.At my program start I execute the following statement:
And in my template I resolve the translation:
I can confirm that all other translations which got added by
.json
files through the normal startup and loading routines ofngx-translate
work fine, but only my manual translation (in this case HELLO) fails. Does anyone know what I am doing wrong?Thanks a lot!
The text was updated successfully, but these errors were encountered: