user_guide_src/source/installation/upgrade_localization.rst
Upgrade Localization ####################
.. contents:: :local: :depth: 2
Language Documentation CodeIgniter 3.x <http://codeigniter.com/userguide3/libraries/language.html>_Localization Documentation CodeIgniter 4.x </outgoing/localization>Specify the default language in Config/App.php:
.. literalinclude:: upgrade_localization/001.php
Now move your language files to app/Language/<locale>.
After that you have to change the syntax within the language files. Below in the Code Example you will see how the language array within the file should look like.
Remove from every file the language loader $this->lang->load($file, $lang);.
Replace the method to load the language line $this->lang->line('error_email_missing') with echo lang('Errors.errorEmailMissing');.
.. literalinclude:: upgrade_localization/ci3sample/002.php
.. literalinclude:: upgrade_localization/002.php