Welcome Guest, Not a member yet? Register   Sign In
Multilingual i18n enviroment for CodeIgniter
#31

[eluser]Volder[/eluser]
Is there a way to change the language inside controller disregarding of the URL we came there?
For example for my /rss/ I want to use English always (while German is the default).

So when I access mysite.com/rss/ - english should be used.
I want to change the language inside RSS controller (question is it possible and how?), and then use lang() that would return English headings.

Thanks!
#32

[eluser]keevitaja[/eluser]
perhaps reading config helpfile?

http://ellislab.com/codeigniter/user-gui...onfig.html
#33

[eluser]Volder[/eluser]
[quote author="keevitaja" date="1360284977"]perhaps reading config helpfile?

http://ellislab.com/codeigniter/user-gui...onfig.html[/quote]

It's not that easy.
I was trying
Code:
$this->config->set_item('language', 'english');
$this->lang->load('mci', 'english');
echo lang('home.title');
before asking here, but it was still returing German version.
Finally I found this thread http://ellislab.com/forums/viewthread/165998/
and added reload() method to MY_Lang library, and then it worked fine.
#34

[eluser]Unknown[/eluser]
Hi

EDIT: Never mind, i didnt include
Code:
$this->load->helper('url');
in controller

I'm using your library.
I get this error trying to print a bar
Code:
Fatal error: Call to undefined function anchor() in E:\xampp\htdocs\MyApp\application\core\MY_Lang.php on line 85
#35

[eluser]quickshiftin[/eluser]
Nice library sir!




Theme © iAndrew 2016 - Forum software by © MyBB