Re: What's __() function?

2010-03-24 Thread dgw
You should find useful info here:

http://book.cakephp.org/view/162/Internationalizing-Your-Application

Best,

David

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: What's __() function?

2010-03-23 Thread nurvzy
I happen to agree that __() shouldn't echo by default.  In fact, I'd
argue it shouldn't echo at all.

Taking a queue from CakePHP1.3 The SessionHelper no longer auto echos
(it was the only Helper that echo'd its results).  I think that's a
good philosophy to follow going forward.

However I disagree that CakePHP devs make the wrong decision about
default parameters.  Other than this, I can't think of any other
default parameter I don't normally use more often than not; that's a
pretty good default decision rate in my book. =)

Nick
On Mar 23, 7:54 pm, cricket  wrote:
> On Mar 23, 8:50 pm, saidbakr  wrote:
>
> > Well,
> > So, What is about the true parameter?
>
> The true parameter is an example of the Cake devs once again making
> the wrong decision about default function parameter values. IMHO, of
> course.
>
> More specifically, the function will return either the translated
> string or echo it. See basics.php.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: What's __() function?

2010-03-23 Thread cricket
On Mar 23, 8:50 pm, saidbakr  wrote:
> Well,
> So, What is about the true parameter?

The true parameter is an example of the Cake devs once again making
the wrong decision about default function parameter values. IMHO, of
course.

More specifically, the function will return either the translated
string or echo it. See basics.php.

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: What's __() function?

2010-03-23 Thread saidbakr
Well,
So, What is about the true parameter?

On Mar 24, 2:30 am, Miles J  wrote:
> __() is used for translation. It matches a slug with the correct mo/po
> file within the correct language/region.
>
> Its for localization.
>
> On Mar 23, 5:11 pm, saidbakr  wrote:
>
> > Hello,
> > This is an example:
> > [CODE]
> > $this->Session->setFlash(__('Post is not found.', true));
> > [/CODE]
>
> > What is the function __(), where I got its documentation and of course
> > what is the difference between writing the previous code without __()
> > function such as:
>
> > [CODE]
> > $this->Session->setFlash('Post is not found.');
> > [/CODE]

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: What's __() function?

2010-03-23 Thread Miles J
__() is used for translation. It matches a slug with the correct mo/po
file within the correct language/region.

Its for localization.

On Mar 23, 5:11 pm, saidbakr  wrote:
> Hello,
> This is an example:
> [CODE]
> $this->Session->setFlash(__('Post is not found.', true));
> [/CODE]
>
> What is the function __(), where I got its documentation and of course
> what is the difference between writing the previous code without __()
> function such as:
>
> [CODE]
> $this->Session->setFlash('Post is not found.');
> [/CODE]

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


What's __() function?

2010-03-23 Thread saidbakr
Hello,
This is an example:
[CODE]
$this->Session->setFlash(__('Post is not found.', true));
[/CODE]

What is the function __(), where I got its documentation and of course
what is the difference between writing the previous code without __()
function such as:

[CODE]
$this->Session->setFlash('Post is not found.');
[/CODE]

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.