i18n library in CI2 |
[eluser]NiconPhantom[/eluser]
Thank you! This information was also helpful for me. Is there any url helper available for this library? If I start new page http://localhost/ci2 my url looks like http://localhost/ci2/en But if I create link anchor('something','something') insted http://localhost/ci2/en/something my url is just http://localhost/ci2/something. Thank you in advance!
[eluser]stirado[/eluser]
[quote author="n0xie" date="1290097032"]The problem is that in the latest CI2.0 build the get_instance() is a wrapper for CI_Controller::get_instance(), a static call to the (new) CI superobject instance. The i18n library does the call before the instance is created. This wasn't a problem before since get_instance() only existed if the CI_Base object was created, but since CI_Base is gone and 'replaced' by CI_Controller, the call is now done before instantiating the object. tl;dr: new PHP4 drop screwed up loading order of things for i18n library You can simply fix it by editing your MY_Config, which is part of the i18n library: Code: class MY_Config extends CI_Config { I tried this with HMVC, where MY_Config extends MX_Config, instead of CI_Config and it doesn't work. Any suggestion?
[eluser]n0xie[/eluser]
Try this: Code: require APPPATH."third_party/MX/Config.php"; |
Welcome Guest, Not a member yet? Register Sign In |