ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Multilingual i18n enviroment for CodeIgniter

October 01, 2012 9:41am

Subscribe [10]
  • #31 / Feb 07, 2013 5:05pm

    Volder

    27 posts

    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 / Feb 07, 2013 7:56pm

    keevitaja

    107 posts

  • #33 / Feb 08, 2013 3:32am

    Volder

    27 posts

    perhaps reading config helpfile?

    http://ellislab.com/codeigniter/user-guide/libraries/config.html

    It’s not that easy.
    I was trying

    $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 / Jun 07, 2013 12:48pm

    riss

    1 posts

    Hi

    EDIT: Never mind, i didnt include

    $this->load->helper('url');

    in controller

    I’m using your library.
    I get this error trying to print a bar

    Fatal error: Call to undefined function anchor() in E:\xampp\htdocs\MyApp\application\core\MY_Lang.php on line 85
  • #35 / Jul 18, 2013 2:28am

    quickshiftin

    49 posts

    Nice library sir!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases