nice to hear that
especially as it is used in controllers, components etc too
and there the echo default is not that much used :)

On 17 Dez., 19:47, "Larry E. Masters aka PhpNut" <[email protected]>
wrote:
> I have plans to change the __*() functions to return by default it has not
> been implemented yet
>
> --
> /**
> * @author Larry E. Masters
> * @var string $userName
> * @param string $realName
> * @returns string aka PhpNut
> * @access  public
> */
>
> On Thu, Dec 17, 2009 at 12:31 PM, euromark <[email protected]>wrote:
>
> > i do agree that this is one of the few remaining inconsistencies
> > remaining in cake1.2/1.3
> > all other functions return by default
> > e.g. in 1.3 the flash() messages now are returned by default, although
> > scripts/css are inline by default (and therefore echod too).
>
> > returning should be the default value in most cases
> > but i dont think in the __() case this is going to happen :)
> > at least it doesnt look like it
>
> > using the ___() function might be a very neat way of fixing it for
> > you, though
> > the overhead is minimal
>
> > you should then use the second param though!
> > function ___($a, $return = true) { return __($a, $return); }
> > to be more flexible
>
> > On 17 Dez., 18:39, djogo <[email protected]> wrote:
> > > Our previous, cake1.1, code was internationalized using php's gettext
> > > library and the function _().
>
> > > Cake1.2 now uses __(), which is great, because doesn't require us to
> > > "compile" .po files anymore.
>
> > > However, the default behaviour of __() is to echo the translated
> > > string, instead of returning it, therefore I'm having a lot of heavy
> > > work going from _( $a )  to __( $a, true ). I have a regexp for
> > > translating _() to __(), but I couldn't figure out how to insert the
> > > ",end" parameter in the end of the call.
>
> > > I though to create a patch in the __() function to change the default
> > > value, but I don't want to have my own "version" of cakephp.
>
> > > Or, I may create
>
> > > function ___($a) { return __($a,true); }
>
> > > I _really_ think cakephp designers should make the second parameters
> > > true by default, to turn the transition easy. However, I need my code
> > > functioning in CAKE 1.2. Do anybody have some tip?
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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 [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<cake-php%[email protected]>For
> >  more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en

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