use sprintf/printf:
sprintf(__('there_are %d comments'), 16);
On May 14, 5:07 am, V <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I get i18n working, and it is a great improvement.
>
> btw, it would be also nice to see an i18n routing :)
> this way it would be possible to give descriptive urls in any language
> but my question is not this
>
> if I understood it well, then the __( ) function does not implement
> string substitutions, altough this would be great (actually I could
> not find the function's definition in the API docs), just take this
> simple example
>
> There are 16 comments
>
> now you have to implement is as
> __('there_are') 16 __('comments')
>
> instead it would be great to use this
> __('there_are_x_comments', array(16))
>
> if array is longer, then the substitution goes on for every element,
> there is no need for any fancy thing, a basic strreplace would be just
> enough, I think
>
> otherwise great work!
>
> Thx, V
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---