django language translation -


hiii have statement.i want translate info message should do.its under httpresponseredirect.. return httpresponseredirect('/info?info=you have not logged in yet')..

i want translate german have not logged in yet german stuff.i knw have update po files..

but if use ('/info?info=you have not logged in yet')::::error if use ('/info?info=(you have not logged in yet')) ::::error . please help!!!!!! in advance

you need use string builder format it:

from django.utils.translation import ugettext _ return httpresponseredirect('/info?info=%s' % (_('you have not logged in yet'),)) 

Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -