I need to setup CodeIgniter to be a truly multi language website. I've searched but I can't find a solution.
I've tested this approach but it is not working. (http://codeigniter.com/wiki/Category%3AInternationalization%3A%3AInternationalization_Views_i18n/)
Can someone give me a clue about what setup to use to get a truly multi language environment in CodeIgniter?
Best Regards,
There are two ways you can build a multilingual website: through a subdomain approach or a separate domain approach. That means you can either have a single website domain with other-language linked pages or use separate domains to host the multilingual versions of your content.
CodeIgniter is the best framework that is used today for the PHP language.
https://github.com/EllisLab/CodeIgniter/wiki/CodeIgniter-2.1-internationalization-i18n
If you implement this, you URLs will contain the language code. You can save your language parts in the language directory. With the function lang();
Loading language files and handling them is explained here: https://www.codeigniter.com/user_guide/libraries/language.html
The helper: https://www.codeigniter.com/user_guide/helpers/language_helper.html
Easiest way is have to some global language files which you auto load. I suggest creating a language file for every controller. So you only load the part you need instead of loading all language files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With