-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Bug(transloco): Multiple languages on the application simultaneously with pipe #736
Comments
@GitHubish I can't fully understand your scenario and there are no instructions for your reproduction (seems like it's just the playground app). |
Sorry @shaharkazaz for not providing enough in my explanation. What I'm trying to do is display a component in a selected language (so the change is dynamic) and this language may therefore be different from the "global" language of my application. The use case is that of a preview of a page that will be printable, this page is made up of a set of components (graphics) and must therefore be displayed in the language selected in a drop-down list without changing the language of the rest of the application. I use an @input to pass them the selected language and I wanted the translations to change using one of the methods on the "Multiple Languages Simultaneously" page, but this doesn't work. I can't use the static argument as it's dynamic. I hope this has made things clearer? Thank you |
@GitHubish Thanks, it's clear. |
@shaharkazaz Thank you very much! Also with the pipe, I guess it's the same thing, it doesn't listen to the change and therefore doesn't update the key translation |
Is there an existing issue for this?
Which Transloco package(s) are the source of the bug?
Transloco
Is this a regression?
No
Current behavior
In my application, I want to display one or more components in a language other than the active language throughout the rest of the application (this is a preview of a printable report). I've tried passing the language as a pipe parameter, using the directive, but it doesn't work dynamically. Changing the language of this preview is done through a drop-down list. And when I change the language, the content translated by the pipe or the directive doesn't change. What's wrong?
Expected behavior
When I change the language in a drop-down list, I want to be able to display only that component in the desired language without changing the active language of the rest of the application.
Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.
https://codesandbox.io/p/sandbox/ngneat-transloco-forked-564v38?file=%2Fsrc%2Fapp%2Fmulti-langs%2Fmulti-langs.component.html%3A9%2C14
Transloco Config
No response
Please provide the environment you discovered this bug in
Browser
No response
Additional context
No response
I would like to make a pull request for this bug
No
The text was updated successfully, but these errors were encountered: