I just had that same issue the other day, see thread:
http://groups.google.com/group/cake-php/browse_thread/thread/3ada672bf5a86b6b/cf386c0d99eca0bf

Basically, all you do is this in your core.php config file:
Configure::write('Config.language', "eng");

This establishes the default language for your app.

Then as the very first thing in beforeFilter, probably best in  
AppController::beforeFilter,
you do the same again to temporarily change the language to something  
else.

Forget about $this->L10n altogether.


On 23 Apr 2008, at 10:07, robert123 wrote:

>
> In the cakephp 1.2 cookbook 
> http://book.cakephp.org/view/161/localization-internationalizat
>
> There is a section
>
> $this->L10n = new L10n();
> $this->L10n->get("en");
> Configure::write('Config.language', "en");
>
> I read  that configure will change the whole application settings. Is
> this correct way to implement i18n, since every user have different
> locale, and if every user execute the statement above, than it will
> change the locale for other user also.
>
> I have tried $this->Session->write('Config.language','en-gb');
>
> but the function __() just will not take any locale from there. Any
> help will be deeply appreciated,
>
>
> www.generics.ws
> www.genericsmed.com
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google  
> Groups "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to [EMAIL PROTECTED]
> For more options, visit this group at http://groups.google.c


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

Reply via email to