{% extends "base.html" %} {% block body %}

Flask i18n example

Text translated in python

{{ some_text }}

{{ best_part }}

{{ singular }}

{{ plural }}

Text translated in the template

{{ _("I am also a sausage.") }}

{{ _("%(language1)s is good, but %(language2)s is more fun", language1='Python', language2='Erlang') }}

{{ ngettext('I signed one lease in the last two years.', 'I signed %(num)d leases in the last two years.', 1) }}

{{ ngettext('I signed one lease in the last two years.', 'I signed %(num)d leases in the last two years.', 8) }}

Text translated in javascript

{% endblock %}