Hi,

I already made some multilingual websites with CakePHP but this time,
it doesn't work and I don't get it.

What I did :

1) Wrote this function in my app_controller.php file

function beforeFilter()
{
                $this->Session->write('Config.language', 'fr');
                pr($this->Session->read());
}

2) Created my pot file : /locale/fr/LC_MESSAGES/default.po containing
this :
msgid "hello_world"
msgstr "Bonjour Monde!!!"

3) Echoed the "hello_world" word in my main view this way :
<?php __('hello_world'); ?>

And this is what I get :

Array
(
    [Config] => Array
        (
            [userAgent] => a306901d9caa36b51a9be87069755367
            [time] => 1274221529
            [timeout] => 10
            [language] => fr
        )

)

hello_world

So it seems like the language is correctly set in the session, but the
__() doesn't work. I don't get it. Does anybody know why it is so?

Thanks in advance.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to