-
Notifications
You must be signed in to change notification settings - Fork 7
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
Default subdomain FR #31
Comments
First, thank you for your nice words! And now to your issue. I just tested a simple Laravel demo and even |
@rseon OK I think I know what's up. So this can lead to a discussion on what is right and what is wrong... The solution of your problem is to set your Here is why: https://github.com/pmochine/Laravel-Tongue/blob/master/src/Tongue.php#L89 If we don't find any locale in your URL, we assume we need to go to your fallback main language. That is in your case
Tell me what you think |
I've tried with another language
So without subdomain, the last locale is used (cookie I think ?) My routes are not translated and I continue to investigate. |
Do you have the middleware active? So that the redirection is working properly? Because in your example when you go back to your domain without the subdomain it always has the latest locale you have used |
When I set the middleware globally in the |
Another funny thing is if I vist But from another language, I'm lost ^^ |
@rseon Okay, could you do me a favour. Create a fresh Laravel project and install my package. And try to create a minimal Laravel package, so I can see your problems. Thank you :) p.S. sorry that I couldn't reply so soon, our city is completely locked down... funny times |
@pmochine You can find the test repo there : https://github.com/rseon/laravel-tongue-test Thanks for your review, and good luck for these funny times ! |
@rseon So thank you for your test repo. You find a pull request where I have change some things. And thank you, because of you I found some small bugs. New patch coming soon |
First : thanks a lot for this package, good job !
I would like to set default language as
fr
(without subdomain) and a subdomain foren
.In /app/config.php :
When I visit the domains :
tongue()->current()
returnsen
instead offr
tongue()->current()
returnsen
(correct)However, when I use
dialect()->current('fr')
it returnsfr.my_domain.dv
anddialect()->current('en')
returnsmy_domain.dv
How can I fix it ?
Thanks a lot !
The text was updated successfully, but these errors were encountered: