Re: gettext localize strings with variables

2011-07-28 Thread Thomas Jollans
On 28/07/11 15:33, miamia wrote: > Hello, > I have > variable OUHH and > print _('This is %(OUHH)s a translatable string.' % locals()) > > how can I translate this ? Get the translation first, insert values second. _('This string contains a variable: {0}. Amazing').format(OUHH) Depending on wha

gettext localize strings with variables

2011-07-28 Thread miamia
Hello, I have variable OUHH and print _('This is %(OUHH)s a translatable string.' % locals()) how can I translate this ? -- http://mail.python.org/mailman/listinfo/python-list