#15674: Error using {% blocktrans %} with variable and {% plural %} ------------------------------------------------+-------------------------- Reporter: anonymous | Owner: nobody Status: new | Milestone: Component: Internationalization | Version: SVN Keywords: blocktrans, template, plural, i18n | Triage Stage: Has patch: 0 | Unreviewed ------------------------------------------------+-------------------------- I need to print a value of one variable, and the translation depends on another variable. I tried the following code:
{{{ {% blocktrans with all_count|num_delimiter as amount count all_count as years %} cost $ {{ amount }} per year. {% plural %} cost $ {{ amount }} per {{ years }} years. {% endblocktrans %} }}} It works. But I can't use only one variable: {{{ {% blocktrans with all_count|num_delimiter as amount count all_count as years %} take $ {{ amount }} per year. {% plural %} take $ {{ amount }} per some years. {% endblocktrans %} }}} It displays the value of a '''amount''' variable, but does not translate text. -- Ticket URL: <http://code.djangoproject.com/ticket/15674> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.