1👍
✅
This should work
_(u"Don't have account? <a href={URL}>Register</a>").format(URL=reverse('account_signup'))
Why .format
works, actually I’ve searched for this before but I could not find a clear answer. My guess is:
-
Some symbols can make the translation fails such as % and single quote.
-
The translated string should use a placeholder which is satisfied in {} and %
-
There are guidlines here http://edx.readthedocs.org/projects/edx-developer-guide/en/latest/internationalization/i18n.html that I usually follow.
Source:stackexchange.com