Re: internationalization in model

2009-08-11 Thread Alexandru Ciobanu

On 8/11/2009 10:16 PM, tobi_one wrote:
> Hi,
>
> for future reference, this is IMHO the most elegant solution for this
> problem:
>
> http://cake.eizoku.com/blog/?p=30#comment-8
>
> Cheers,
> tobi_one
>
> On Jul 29, 4:07 am, "Dr. Loboto"  wrote:
>
>> With Model::invalidate() method reload you do not have such problems
>> at all.
>>
>> On Jul 29, 12:17 am,tobi_one  wrote:
>>
>>  
>>> Hi,
>>>
>>  
>>
>>> It works great, but there is one problem. I set the language of the
>>> app in the beforefilter of the app_controller. Apparently the models
>>> are loaded before this and so the models always return the default
>>> language.
>>>
>>  
>>> Where do you guys set the language of the app? Especially if you are
>>> using the __contruct method as mentioned in the post from above.
>>>
>
Why not use 'error' in the input() option array?
http://api.cakephp.org/class/form-helper#method-FormHelperinput

I believe it was designed for this purpose. Perhaps a cake developer can 
confirm/infirm this.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: internationalization in model

2009-08-11 Thread tobi_one

Hi,

for future reference, this is IMHO the most elegant solution for this
problem:

http://cake.eizoku.com/blog/?p=30#comment-8

Cheers,
tobi_one

On Jul 29, 4:07 am, "Dr. Loboto"  wrote:
> With Model::invalidate() method reload you do not have such problems
> at all.
>
> On Jul 29, 12:17 am,tobi_one wrote:
>
> > Hi,
>
> > I am using __() internationalization in my model as described here:
>
> >http://groups.google.com/group/cake-php/browse_thread/thread/fa32c81a...
>
> > It works great, but there is one problem. I set the language of the
> > app in the beforefilter of the app_controller. Apparently the models
> > are loaded before this and so the models always return the default
> > language.
>
> > Where do you guys set the language of the app? Especially if you are
> > using the __contruct method as mentioned in the post from above.
>
> > Thanks!
>
> > Cheers,
> >tobi_one
>
>
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: internationalization in model

2009-07-28 Thread Dr. Loboto

With Model::invalidate() method reload you do not have such problems
at all.

On Jul 29, 12:17 am, tobi_one  wrote:
> Hi,
>
> I am using __() internationalization in my model as described here:
>
> http://groups.google.com/group/cake-php/browse_thread/thread/fa32c81a...
>
> It works great, but there is one problem. I set the language of the
> app in the beforefilter of the app_controller. Apparently the models
> are loaded before this and so the models always return the default
> language.
>
> Where do you guys set the language of the app? Especially if you are
> using the __contruct method as mentioned in the post from above.
>
> Thanks!
>
> Cheers,
> tobi_one
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



internationalization in model

2009-07-28 Thread tobi_one

Hi,

I am using __() internationalization in my model as described here:

http://groups.google.com/group/cake-php/browse_thread/thread/fa32c81acc043eef/6a49c6d9fdc6f158?lnk=st&q=#6a49c6d9fdc6f158

It works great, but there is one problem. I set the language of the
app in the beforefilter of the app_controller. Apparently the models
are loaded before this and so the models always return the default
language.

Where do you guys set the language of the app? Especially if you are
using the __contruct method as mentioned in the post from above.

Thanks!

Cheers,
tobi_one
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---