是否有可能使用{% blocktrans %}
與「與」和「計數」在同一時間?使用blocktrans與「同」和「算」關鍵字一起
的文檔描述只是單獨使用:
{% blocktrans with foo|filter as bar and baz|filter as boo %}
{% blocktrans count var|length as count %}
我需要打印一個變量的值,翻譯依賴於另一個變量。我嘗試下面的代碼:
{% blocktrans count cnt as count with cnt|make_text_from_count as text_count %}
and other {{ text_count }} city
{% plural %}
and other {{ text_count }} cities
{% endblocktrans %}
它顯示text_count
變量的值,但不翻譯文本。
Python 2.6.6,Django 1.3,django-templates。
問題出在.m文件中的「模糊」標誌。 – Gregory 2011-03-24 13:07:27