Hi!
I'm just wondering why the controller set in set404Override() not listening to the selected locale. Is this a feature or a bug?
Any other controller is working properly.
app/Config/Routes.php
app/Controllers/Error.php
I'm just wondering why the controller set in set404Override() not listening to the selected locale. Is this a feature or a bug?
Any other controller is working properly.
app/Config/Routes.php
PHP Code:
$routes->set404Override('App\Controllers\Error::error_404');
app/Controllers/Error.php
PHP Code:
<?php namespace App\Controllers;
class Error extends BaseController {
public function error_404() {
echo $this->request->getLocale(); //Output: no (Norwegian)
echo view('_includes/header_clean'); // Outputs data from en (English)
echo view('main/main'); // Outputs data from en (English)
echo view('_includes/footer_clean'); // Outputs data from en (English)
echo $this->request->getLocale(); //Output: no (Norwegian)
}
}