How to change default language in CodeIgniter?


The following has been tested on a Cloud9 server with the following versions:

Based on the CodeIgniter tutorial

This page assume that your langage already exists in the CodeIgniter 3 Translations repositories. This example explains how to switch from English to French.

Clone from Git

Clone the repository (outside of your development workspace):

git clone

Link the requested langage

Create a symbolic link from the previous folder to your application/language folder:

ln -s ~/codeigniter3-translations/language/french/ ~/workspace/application/language/ 

Update config file

Update the variable $config['language'] in /application/config/config.php:

$config['language'] = 'french';

See also

Last update : 11/23/2021