Reputation: 13315
I am using django 1.27 with python 2.7.2.
I want a message to be translated to an empty string.
For example if i have this in my django.po file:
# .\path\file.py
msgid "word"
msgstr ""
So i want it to not show the 'word' when translating the page.
I have tried putting a space instead of "" but that did not help and i still get the original 'word' displayed.
How can i do that ?
Upvotes: 6
Views: 1059
Reputation: 17359
Putting a space " "
instead of ""
works for me (Django 1.6, Python 3.2). Are you sure you've done django-admin.py compilemessages
and reloaded the server after changing the translation?
# .\path\file.py
msgid "word"
msgstr " "
Upvotes: 0
Reputation: 9801
No, you can't do that.
django's translation process is based on the GNU gettext toolset. This a gettext bug many people have complained.
There is a workaround that you can translate them to invisible unicode characters like U+200B, U+180E, U+2063
Upvotes: 7