This is weird: I can successfully change the language with $this-
>Session->write('Config.language', 'fr'); in the beforeRender()
function in apps_controller.php
Why does it not work in beforeFilter()?
Does it matter where it's being done?
On Mar 10, 2:09 pm, jakobjp wrote:
> On Mar 10, 2:25
On Mar 10, 2:25 am, "jitka (poLK)" wrote:
> > I have created two test languages in:
> > /app/locale/eng/LC_MESSAGES/default.php
> > /app/locale/fre/LC_MESSAGES/default.php
>
> php extension is reason. CakePHP assumes there plaintext .po (or
> preferrable binary .mo) files.
Yeah that was a mist
Unfortunately that didn't do the trick... :-(
On Mar 10, 1:42 am, Miles J wrote:
> I use app import and it worked for me:
>
> App::import('Core', 'l10n');
> $l10n = new L10n();
> $l10n->get($locale);
>
> I also place it in my app controller beforeFilter(). If you are doing
> it in another contro
> I have created two test languages in:
> /app/locale/eng/LC_MESSAGES/default.php
> /app/locale/fre/LC_MESSAGES/default.php
php extension is reason. CakePHP assumes there plaintext .po (or
preferrable binary .mo) files.
--~--~-~--~~~---~--~~
You received this mess
I use app import and it worked for me:
App::import('Core', 'l10n');
$l10n = new L10n();
$l10n->get($locale);
I also place it in my app controller beforeFilter(). If you are doing
it in another controller, be sure to call parent::beforeFilter() in
that controllers beforeFilter().
--~--~-~
've been reading a lot about l10n in cakephp now, but there seems to
be some
confusion about what is the correct way to use languages...
I have created two test languages in:
/app/locale/eng/LC_MESSAGES/default.php
/app/locale/fre/LC_MESSAGES/default.php
I am displaying my test string in a view