Hi,
just user sprintf() (or printf()):
In your View:
printf(__("age_old", true), 55);
In your .po:
msgid "age_old"
msgstr "I am %d years old"
Look at http://de.php.net/sprintf for further information.
Best regards
Andreas
On 30 Aug., 18:13, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Is there any way to pass variables inside as call to _() so I can
> maintain context for the .po file translator, or do I have to do it
> with multiple calls?
>
> i.e.
> _("age_old", array('age' => 55))
>
> msgid "age"
> msgstr "i am {0} years old"
>
> output: "i am 55 years old"
>
> Or do I have to do this...
>
> _("age") . 55 . __("years")
>
> msgid "age"
> msgstr "i am "
>
> msgid "years"
> msgstr " years old"
>
> output: "i am 55 years old"
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---