Django的XML本地化交换文件格式(XLIFF)序列化程序
django-xliff的Python项目详细描述
完整的文档位于Read the Docs。
XML本地化交换文件格式(XLIFF)是一种基于XML的格式,用于标准化本地化过程中在工具之间传递可本地化数据的方式。OASIS2002年标准化的xliff。django xliff符合version 1.2。
xliff比django的标准xml输出要详细一些。示例输出看起来像(为可读性添加了额外的空白:
<?xml version="1.0" encoding="utf-8"?><xliffxmlns="urn:oasis:names:tc:xliff:document:1.2"version="1.2"xmlns:d="https://docs.djangoproject.com/"><filedatatype="database"source-language="en-us"original="simpleapp.tag.2"><body><groupresname="simpleapp.tag.2"restype="row"><trans-unitresname="data"translate="no"id="data"restype="x-SlugField"><source>tag2</source></trans-unit><trans-unitd:keytype="pk"d:to="contenttypes.contenttype"restype="x-ForeignKey"d:rel="ManyToOneRel"resname="content_type"translate="no"id="content_type"><source>37</source></trans-unit><trans-unitresname="object_id"translate="no"id="object_id"restype="x-PositiveIntegerField"><source>200</source></trans-unit></group></body></file></xliff>