Hi. I am trying to get a localised 404 error message, if URI segment with supported language is present. If it is not present, it should fallback to default language, as it is with basic localisation.
There is a support for localisation:
PHP Code:
$routes->get('{locale}/books', 'App\Books::index');
And override method for 404 error mesage.
PHP Code:
$routes->set404Override('App\Errors::show404');
Is it possible to get something like this?
PHP Code:
$routes->set404Override('{locale}\App\Errors::show404');
If you know what I mean. Or I have to check URI segments manually in the override method? Do you have any suggestions?