-
Notifications
You must be signed in to change notification settings - Fork 168
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
Matching laravel current locale in js #127
Comments
I just had the same problem and as it's not documented I'll add the better option here as well. This package tries to guess language from Hope it helps. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My question is how to most elegantly set current locale in js, based on currently used laravel (backend locale)?
I have tried different solutions like for example setting locale based on headers - accept language, but it is not working correctly under some circumstances.
Currently I have it working by including view partial on every page:
but it seems like terrible solution.
Any ideas how to deal with this respecting best practices?
The text was updated successfully, but these errors were encountered: