简体   繁体   中英

Translating XML templates in Django

I am using Django 1.9 and have a XML template in the application's template folder, like this:

{% load i18n %}
<!DOCTYPE document SYSTEM "http://www.reportlab.com/docs/rml.dtd">
<document filename="testdocument.pdf" colorSpace="CMYK" author="Me" title="Report">
...

I am placing {% trans "Foo" %} markers as usual, but makemessages -l <lang> doesn't create them in the .po file. HTML templates work fine.

How can I translate XML templates?

我想我用makemessages -l <lang> -e xml管理它

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM