{locale} placeholder in routes |
(06-10-2022, 06:34 PM)includebeer Wrote:(06-10-2022, 06:05 PM)kenjis Wrote: See this PR: https://github.com/codeigniter4/CodeIgniter4/pull/6073 The main question is why you run into this problem, that you need to redirect with right locale? How does the wrong locale appear in your URL? Is it even possible to happen just so? @kenjis This makes the solution which I posted even better! Like that. DONE. Fallback behaviour implemented. Add to: app/Config/Routes.php PHP Code: $routes->useDefinedLocalesOnly(true); Create file: app/Services/Routes.php PHP Code: <?php Add to: app/Services/Router.php (check the code in first post to find the place where to put this) PHP Code: /** Add use to: app/Config/Services.php PHP Code: use App\Services\Router; and function PHP Code: /** |
Messages In This Thread |
{locale} placeholder in routes - by webdeveloper - 06-08-2022, 06:23 AM
RE: {locale} placeholder in routes - by includebeer - 06-08-2022, 03:10 PM
RE: {locale} placeholder in routes - by webdeveloper - 06-09-2022, 01:56 AM
RE: {locale} placeholder in routes - by includebeer - 06-09-2022, 02:44 PM
RE: {locale} placeholder in routes - by InsiteFX - 06-09-2022, 11:57 PM
RE: {locale} placeholder in routes - by includebeer - 06-10-2022, 12:36 PM
RE: {locale} placeholder in routes - by kenjis - 06-10-2022, 06:05 PM
RE: {locale} placeholder in routes - by includebeer - 06-10-2022, 06:34 PM
RE: {locale} placeholder in routes - by webdeveloper - 06-11-2022, 04:29 AM
|