CodeIgniter Forums

Full Version: Multi language web
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, I'm using localization to make my website  Multi-language website so what I did is in the Language folder I added the following, en folder, and ar folder. So the structure is 

and in the routes.php I added the {locale} like below

PHP Code:

// Post routes

$routes->group('post' , function($routes){

// User
$routes->group('user' , function($routes){
$routes->get('login' 'User\Users::login');
$routes->add('{locale}/logout' 'User\Users::logout');
// Admin
$routes->group('admin' ,['filter' => 'AdminFliter'], function($routes){
$routes->add('{locale}/dashboard' 'User\Admin::dashboard');
$routes->get('{locale}/profile' 'User\Admin::profile');
$routes->add('{locale}/edit_profile' 'User\Admin::edit_profile');
$routes->add('{locale}/posts' 'User\Admin::posts');
$routes->add('{locale}/addPost' 'User\Admin::addPost');
$routes->add('{locale}/post_delete/(:any)' 'User\Admin::post_delete/$1');
it is working only with the home page which is the route and the others it gives me
404 - File Not Found

Controller or its method is not found: {0}::{1}

so what I am missing?
View files should go into the Views folder not the language folder.

The Language folder holds arrays of the language definitions.