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 know we can now put the locale segment in routes but this is not enough.
The problem with this feature how it works right now it has a big issue that we can fix.
After put the segment in all routes and setup the redirects so it can work with negotiateLocale
All website should now contain this {locale} into the URL
the problem with this route is
$routes->add('{locale}', 'Homepage::index');
so if you get into the url of the website
example.com it wont work because the route is expecting the locale so i get 404 ERROR page
I want to redirect the user to the good route and because of 404 cannot do this.
i have to put both routes
$routes->add('{locale}', 'Homepage::index');
$routes->add('/', 'Homepage::index');
but then what is the point with the {locale} variable..
Also when i have only this route and not have both routes like above
$routes->add('{locale}/', 'Homepage::index');
I will GET 404 Error Page again. for this to work i have to create another route with another controller to handle the redirect to the {locale} page
After i added a filter that checks the locale and if is not set redirect to it again this only works if you won`t get a 404 error page.
After all this work i realized that i don`t want languages on my website so now i have no option to go back to i have to rework all routes. How can i do this without changing my routes.
I must ask to add in the Configuration of the APP
Enable or Disable Routes LOCALIZATION
because when you switch off localization, all {locale} segments from routes should be empty.
Example :
$routes->add('{locale}/contact', 'Contact::index');
should work with both cases if localization is enabled only these links will work
example.com/{locale}/contact
If localization is disabled both links should work
example.com/{locale}/contact
example.com/contact
I always have problems with this language and there were no way to actually enable or disabled languages on the website.
Is there something i miss ? or i`m doing something wrong ?
The text was updated successfully, but these errors were encountered:
I know we can now put the locale segment in routes but this is not enough.
The problem with this feature how it works right now it has a big issue that we can fix.
All website should now contain this {locale} into the URL
the problem with this route is
$routes->add('{locale}', 'Homepage::index');
so if you get into the url of the website
example.com it wont work because the route is expecting the locale so i get 404 ERROR page
I want to redirect the user to the good route and because of 404 cannot do this.
i have to put both routes
$routes->add('{locale}', 'Homepage::index');
$routes->add('/', 'Homepage::index');
but then what is the point with the {locale} variable..
Also when i have only this route and not have both routes like above
$routes->add('{locale}/', 'Homepage::index');
I will GET 404 Error Page again. for this to work i have to create another route with another controller to handle the redirect to the {locale} page
After i added a filter that checks the locale and if is not set redirect to it again this only works if you won`t get a 404 error page.
After all this work i realized that i don`t want languages on my website so now i have no option to go back to i have to rework all routes. How can i do this without changing my routes.
I must ask to add in the Configuration of the APP
Enable or Disable Routes LOCALIZATION
because when you switch off localization, all {locale} segments from routes should be empty.
Example :
$routes->add('{locale}/contact', 'Contact::index');
should work with both cases if localization is enabled only these links will work
example.com/{locale}/contact
If localization is disabled both links should work
example.com/{locale}/contact
example.com/contact
I always have problems with this language and there were no way to actually enable or disabled languages on the website.
Is there something i miss ? or i`m doing something wrong ?
The text was updated successfully, but these errors were encountered: