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
I'm switching the languages on my site via controllers (a select element on a form that calls a POST route/controller when language is selected), but when I use dialect()->translate() in my controller, to translate the current route and redirect the user to the translated route, it always returns my current POST route that is reading my request to switch the language, not the translated route that it should return.
And if I use dialect()->redirectUrl() it returns the URL not parsed and doens't translate de route to the selected language, as its described on your documentation.
What should I do? The only solution would be switching languagues without using controllers? The dialect()->translate() function works perfectly outside controllers.
Thank you.
The text was updated successfully, but these errors were encountered:
Hello, the solution I found for this was switching languages with a list of translated links from dialect()->translate() on the front-end, rather than switching languages using controllers.
I'm switching the languages on my site via controllers (a
select
element on aform
that calls a POST route/controller when language is selected), but when I usedialect()->translate()
in my controller, to translate the current route and redirect the user to the translated route, it always returns my current POST route that is reading my request to switch the language, not the translated route that it should return.And if I use
dialect()->redirectUrl()
it returns the URL not parsed and doens't translate de route to the selected language, as its described on your documentation.What should I do? The only solution would be switching languagues without using controllers? The
dialect()->translate()
function works perfectly outside controllers.Thank you.
The text was updated successfully, but these errors were encountered: