• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extending CI_Config site_url() Localization

#1
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:Confusedite_url($uri);
    }
}
Reply

#2
Did you read all of the comments?
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

#3
Okay so interestingly, this doesn't work alongside HMVC (https://bitbucket.org/wiredesignz/codeig...sions-hmvc)

Anyone have any suggestions?
Reply

#4
Solved:
https://stackoverflow.com/questions/4566...1#45678241
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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