On May 14, 4:13 pm, V <[EMAIL PROTECTED]> wrote:
SNIP
> as an other idea it would be good to implement two different gettext
> functions like
> _e( )  -> echo automatically
> __( )  -> don't echo

> as an other idea it would be good to implement two different gettext
> functions like
> _e( )  -> echo automatically
> __( )  -> don't echo

This already exists in PHP's gettext implementation. Using a single
underscore simply returns the text, instead of echoing it:

_('Hi');

To do substitutions like you are wanting to do, I use this:

<?php printf(_('This album was created by %s on %s.'), 'user',
'1/1/2007'); ?>

Brad

-----------------------------------------------

Brad Daily
Developer, SlideShowPro Director
http://slideshowpro.net



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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