Language Part 1

1
1515
views

After download translations / language core codeigniter. We will activate and create language.

Update autoload.php in application/config/autoload.php, load library session, load helper language.

Update config_bootstrap.php in application/config/config_bootstrap.php, add language.

Update top.php in application/views/adminlte/backend/_partials/top.php, to show language in top template.

Create MY_Lang.php in application/core/MY_Lang.php

Update config.php in application/config/config.php, line 103, enable hooks.

Create Language_hooks.php in application\hooks\Language_hooks.php

Update hooks.php in application/config/hooks.php, this mean after controller load, we execute Language_hooks.php to load language based on session language.

Create index_lang.php in application/language/english/index_lang.php, this for english.

Create index_lang.php in application/language/indonesian/index_lang.php, this for indonesian language.

Example “Create”, we must replace with

, in example
application/views/adminlte/backend/users/index.php

Don’t forget update all text based on application/language/english/index_lang.php.

Reference :
https://github.com/redzjovi/codeigniter3blog/commit/84a1abbab0283c15e37ee32930c124ca97567d82

Previous articleSimple Breadcrumb
Next articlePost Categories
SHARE

1 COMMENT

LEAVE A REPLY

Please enter your name here
Please enter your comment!