• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi language web

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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.