CodeIgniter Forums
Language Switcher - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: Language Switcher (/showthread.php?tid=74332)

Language Switcher - tebogosebake - 09-11-2019

How can i create a language switcher in codeigniter 4 ? ( It was simple In codeigniter 3 using hooks)  Confused

RE: Language Switcher - php_rocs - 09-11-2019


Were you unable to find any suggestions in the documentation?

RE: Language Switcher - kilishan - 09-11-2019

Hooks are still around, just called Events. So you can probably adapt the way you did it previously there.

However, it might be better to use Controller Filters. You could detect the language in the filter and set it in the session, etc before every page load if you do that globally.