• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Language Switcher

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

#2
@tebogosebake,

Were you unable to find any suggestions in the documentation? https://codeigniter4.github.io/userguide...calization
Reply

#3
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.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.