-
-
Notifications
You must be signed in to change notification settings - Fork 586
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
Subsequent calls to translateService.use(language) may change to an older language #749
Comments
It looks similar to #224. @beradrian what would be your fix here? |
You have this method in TranslateService
I would modify it to
Similarly you can do the same for default language. |
Looking good, thanks for sharing! Maybe it would ease integration if PR was submitted? Would you like to submit it or should I? @ocombe any thoughts? |
Yes, sure I can submit a PR if you want. Just let me know. Thanks! |
Is it scheduled to fix this bug in a future version? |
Hi, is there any update or workaround for this? Thank you! |
I'm submitting a ... (check one with "x")
Current behavior
Let's suppose you call
translateService.use("de")
and thentranslateService.use("en")
. Now, if de.json takes 500ms to load and en.json takes 100ms to load, in the end the current language will be "de".Expected/desired behavior
The current language should be the one of the last
.use()
call, in the example aboveen
.Reproduction of the problem
If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar. You can use this template as a starting point: http://plnkr.co/edit/tpl:XXwyUYS6ZL7qVD9I2l0g
What is the expected behavior?
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
ngx-translate version: x.x.x
9.0.1
Angular version: 2.x.x
5.0.0
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome
If needed I can provide a PR with the fix.
The text was updated successfully, but these errors were encountered: