The purpose of

T('Add %s',single)

is to have a string that contains a parameter. %s is the parameter.
You still only translate 'Add %s' but %s is replaced by the value of
single ar runtime. This is how all frameworks handle it too.

There is no way you ca translate 'Add %s' % single because at the
moment of translation you do know know the value of the variable
single.

Massimo

On Jan 4, 3:57 am, Fran <[email protected]> wrote:
> On Jan 3, 11:29 pm, mdipierro <[email protected]> wrote:
>
> > Thats is not how you do it because concatenaning translated strings
> > does not result in a valid translation.
>
> Right - that was my point ;)
>
> > should be
> >     title_create=T('Add %s',single)
>
> ok, so that still works as-desired in English, just like
> "title_create=T('Add %s' % single)" did.
> However it still doesn't work for Internationalization.
> (Assume single='shelter')
> In the strings list I get 'Add %s', I don't get 'Add Shelter' or even
> 'Shelter'.
>
> F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to