No, but I use Auth component and initialize it in App's beforeFilter.
And this component call __( ) function ...and so set language
On Jun 26, 4:51 pm, "Marcin Domanski" <[EMAIL PROTECTED]> wrote:
> Het,
> are you setting the lang in beforeFilter ?
> greets,
>
>
>
> On Thu, Jun 26, 2008 at 1:56 PM, Pento <[EMAIL PROTECTED]> wrote:
>
> > Thanks for reply!
> > Hmmm, I will have to hack some code in this situation..
>
> > On Jun 26, 12:12 pm, biesbjerg <[EMAIL PROTECTED]> wrote:
> >> I don't think it's possible to change language mid-page, as you just
> >> said, i18n is a singleton and the po/mo file is parsed and loaded once
> >> per request.
>
> >> On Jun 25, 6:47 pm, Pento <[EMAIL PROTECTED]> wrote:
>
> >> > Thanks, but it not work correctly when for example auth component is
> >> > used.
> >> > Problem because of Singlton pattern used in "cake/libs/i18n.php"
> >> > translate function: $_this =& I18n::getInstance();
> >> > When I call $this->Session->write('Config.language', 'ru');
> >> > it's already called in auth component before, so I can't change
> >> > immediately current language in controller method. Only in next page
> >> > loading it will be changed.
> >> > But my method generates some report on various languages and I need to
> >> > change current language for correct genetaration in the scope of
> >> > method.
>
> >> > On Jun 25, 2:00 pm, "Dr. Tarique Sani" <[EMAIL PROTECTED]> wrote:
>
> >> > > On Wed, Jun 25, 2008 at 3:02 PM, Pento <[EMAIL PROTECTED]> wrote:
>
> >> > > > Hello, everybody!
>
> >> > > > How can I control current langauge for l10n and i18n in my
> >> > > > controller?
>
> >> > > $this->Session->write('Config.language', 'new lang TLA');
>
> >> > > ??
>
> >> > > T
>
> >> > > --
> >> > > =============================================================
> >> > > Cheesecake-Photoblog:http://cheesecake-photoblog.org
> >> > > PHP for E-Biz:http://sanisoft.com
> >> > > =============================================================
>
> --
> Marcin Domanskihttp://kabturek.info
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---