Developing a Multilingual Site in CodeIgniter
Go to application/config folder and open config.php. Add the following line to specify the website’s default language.
$config['language'] = 'english';
$config['language'] = 'english';
Now to create the language options, of to application/language folder and create separate subfolders for each language. Next, in each subfolder, create a file with the suffix _lang. For instance, if you wish to offer a file named information.php in English and German languages, use the following structure:
Application→ language → English → information_lang.php
Application→ language → German → information_lang.php
Within the language file, information_lang.php, add every line of text to a $lang array in the following format:
$lang['language_key'] = 'type your message';
$lang['language_key'] = 'type your message';
For instance, the entry for the text line, “Type message in German” in the file in the German language folder would look like:
$lang['welcome_message'] = 'Type message in German';
$lang['welcome_message'] = 'Type message in German';
Read full article at: https://www.cloudways.com/blog/multi-language-codeigniter/