Multilingual i18n enviroment for CodeIgniter |
[eluser]Hamed[/eluser]
I like this lib. I think there is some problem with default language.
[eluser]keevitaja[/eluser]
according to best of my knowledge default language is "problem free". can you explain the problem?
[eluser]Hamed[/eluser]
When I open my page and I don't use site_url() I have problem. It redirect me to root controller.
[eluser]keevitaja[/eluser]
still do not get it. sure it is multilingual problem. paste some code and explain some more.
[eluser]Hamed[/eluser]
Now I am working on new script let check it again, I hope it works fine.
[eluser]Hamed[/eluser]
How can I change current page language? for example my user view http://127.0.0.1/en/user/profile now I want to change it to http://127.0.0.1/fa/user/profile? How to find out current url..
[eluser]keevitaja[/eluser]
mci_current() - returns current language segment for changing the langage just use langbar() helper which prints out the links
[eluser]keevitaja[/eluser]
i added mci_change() method and lchange() helper which gives you current controller uri for different language. use in view: Code: <?php echo anchor(lchange('en')); ?> if no language is not specified, you get an array containing all language uris except current
[eluser]Hamed[/eluser]
I get Fatal error: Call to undefined function mci_current() How can I fix it? is it yours? http://maestric.com/en/doc/php/codeigniter_i18n
[eluser]keevitaja[/eluser]
in the controller you must call it Code: $this->lang->mci_current() because it is MY_Lang class method. only helpers can be called as functions please see my example controller: https://github.com/keevitaja/mci-codeign...xample.php |
Welcome Guest, Not a member yet? Register Sign In |