Extending CI_Config site_url() Localization |
Refer to:
http://jeromejaglale.com/doc/php/codeigniter_i18n https://github.com/waqleh/codeigniter-la...nalization (2017 updated version of previous link) So I included the github source for MY_Lang and MY_Config. MY_Lang extends well and all functions work. But MY_Config's site_url() does not work. site_url() should return the uri with localization 'en' etc such as 'en/about'. Even having it echo and die in the beginning does not work. MY_Config code : class MY_Config extends CI_Config { function site_url($uri = '', $protocol = NULL) { if (is_array($uri)) { $uri = implode('/', $uri); } if (class_exists('CI_Controller')) { $CI = & get_instance(); $uri = $CI->lang->localized($uri); } return parent: ![]() } }
Did you read all of the comments?
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
Okay so interestingly, this doesn't work alongside HMVC (https://bitbucket.org/wiredesignz/codeig...sions-hmvc)
Anyone have any suggestions? |
Welcome Guest, Not a member yet? Register Sign In |