简体   繁体   English

在Django中翻译XML模板

[英]Translating XML templates in Django

I am using Django 1.9 and have a XML template in the application's template folder, like this: 我正在使用Django 1.9,并且在应用程序的template文件夹中有一个XML模板,如下所示:

{% 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. 我照常放置{% trans "Foo" %}标记,但是makemessages -l <lang>不在.po文件中创建它们。 HTML templates work fine. HTML模板工作正常。

How can I translate XML templates? 如何翻译XML模板?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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