Skip to content

Instantly share code, notes, and snippets.

@patrys
Created January 18, 2011 17:38
Show Gist options
  • Save patrys/784810 to your computer and use it in GitHub Desktop.
Save patrys/784810 to your computer and use it in GitHub Desktop.
Proper translation for gender-related messages
{% load i18n %}
{% if u.sex == 'm' %}
{% blocktrans with u.get_full_name as male %}
{{ male }} set up us a bomb.
{% endblocktrans %}
{% else %}
{% blocktrans with u.get_full_name as female %}
{{ female }} set up us a bomb.
{% endblocktrans %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment