-
Notifications
You must be signed in to change notification settings - Fork 17
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
Set user language from browser header if no cookie is available #242
Comments
There's also the navigator.language(s) that can be used (https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language) |
Also, we should move away from this laravel session thing. It's really awkward... We should be able to just use a cookie for this imo. Can we fix this? I like the proposal of @Bertware in each case! |
https://github.com/iRail/hyperRail/blob/master/app/Http/Middleware/Language.php#L32 should be appended with |
This functionality was implemented using locale_lookup. This means the php_intl module is required. This function was chosen as it implements the search protocol for languages and keeps the weights in mind. Note: |
Added tests for language, special cases. Fixed broken tests iRail#253
The language selection is an additional screen between navigating to irail.be and performing a search. Selecting a language takes almost as long as taking a train, the language selection is intrusive and does not feel really user-friendly
Current situation:
Proposed improvement:
When the user has already visited irail.be, the previous language is used. (This is already the case)
The text was updated successfully, but these errors were encountered: