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
[x ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
Current behavior
ng2-translate changes the language, when a requested language JSON file arrives at the client, regardless of the value of the last call to use().
Expected/desired behavior
When a request for a language JSON file arrives at the client, ng2-translate should change the language only, if the arrived language data is for the language, that has been chosen last.
Reproduction of the problem
For example delay the delivery of the json files by some seconds. If you have an apache and php like this:
Chose a language and wait until the json file is downloaded.
Switch to another language and before this new json file has been downloaded:
Switch back to the first language.
It should also be reproducible without any delay, if you use('en') in a component constructor and then in a click handler use('fr'); use('en');.
What is the expected behavior?
The last selected language should be visible. Any pending, outdated language selection should have no effect.
What is the motivation / use case for changing the behavior?
I'm setting the language in my app component. The languages are not reflected in the routes. But some routes contain a language code. The language is set by the specific components, that handle those routes requests. Maybe not the best approach, but changing the language according to the order of the use() calls would be the correct behavior anyways.
Please tell us about your environment:
ng2-translate version: 2.4.2
Angular version: 2.0.0-rc.5
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 ]
Language: [all | TypeScript X.X | ES6/7 | ES5]
The text was updated successfully, but these errors were encountered:
I'm submitting a ... (check one with "x")
Current behavior
ng2-translate
changes the language, when a requested language JSON file arrives at the client, regardless of the value of the last call touse()
.Expected/desired behavior
When a request for a language JSON file arrives at the client,
ng2-translate
should change the language only, if the arrived language data is for the language, that has been chosen last.Reproduction of the problem
For example delay the delivery of the json files by some seconds. If you have an apache and php like this:
delay.php
:It should also be reproducible without any delay, if you
use('en')
in a component constructor and then in a click handleruse('fr'); use('en');
.What is the expected behavior?
The last selected language should be visible. Any pending, outdated language selection should have no effect.
What is the motivation / use case for changing the behavior?
I'm setting the language in my app component. The languages are not reflected in the routes. But some routes contain a language code. The language is set by the specific components, that handle those routes requests. Maybe not the best approach, but changing the language according to the order of the
use()
calls would be the correct behavior anyways.Please tell us about your environment:
The text was updated successfully, but these errors were encountered: