XLIFFXML Localisation Interchange File Format,即XML本地化交换文件格式)是一种基于XML的交换格式,旨在标准化本地化过程中在工具之间传递可本地化数据的方式,是CAT工具中常用的一种文件格式。XLIFF由結構化資訊標準促進組織(OASIS)于2002年标准化,目前规范为2014年8月5日发布的v2.0。[1]

XLIFF
扩展名
.xlf
互联网媒体类型
2.0前:application/x-xliff+xml,2.0及之后:application/xliff+xml
最新版本
2.0[1]
2014年8月5日,​9年前​(2014-08-05
扩展自XML

该规范针对本地化行业,规范了用何种元素和属性存储从各种原始文件格式中提取的内容与相应翻译。其目标是抽象化本地化技能,使人们从HTML等特定格式的相关工程技术中抽身。[2]

XLIFF格式是“开放架构”的XML创作与本地化(OAXAL英语OAXAL)参考架构的一部分。

描述 (XLIFF 1.2) 编辑

一份XLIFF 1.2[3]文档由一个或多个<file>元素组成。每个<file>元素对应一个原始文件或来源(例如数据库表)。<file>包含可本地化数据的源数据,并且每个区域只有一份的本地化数据。

本地化数据存储在<trans-unit>元素里。<trans-unit>元素有一个<source>元素来存储源文本,并有一个<target>元素存储最新的已翻译文本。<target>元素非强制性。

<trans-unit id="1">
 <source xml:lang="en">Cannot find the file.</source>
 <target xml:lang="fr">Fichier non trouvé.</target>
</trans-unit>

下面的例子展示一个XLIFF文档,它存储了从Photoshop文件(PSD文件)提取的文本,以及日文译文。

<xliff version="1.2">
 <file original="Graphic Example.psd"
  source-language="en-US" target-language="ja-JP"
  tool="Rainbow" datatype="photoshop">
  <header>
   <skl>
    <external-file uid="3BB236513BB24732" href="Graphic Example.psd.skl"/>
   </skl>
   <phase-group>
    <phase phase-name="extract" process-name="extraction"
     tool="Rainbow" date="20010926T152258Z"
     company-name="NeverLand Inc." job-id="123"
     contact-name="Peter Pan" contact-email="ppan@example.com">
     <note>Make sure to use the glossary I sent you yesterday.
      Thanks.</note>
    </phase>
   </phase-group>
  </header>
  <body>
   <trans-unit id="1" maxbytes="14">
    <source xml:lang="en-US">Quetzal</source>
    <target xml:lang="ja-JP">Quetzal</target>
   </trans-unit>
   <trans-unit id="3" maxbytes="114">
    <source xml:lang="en-US">An application to manipulate and 
     process XLIFF documents</source>
    <target xml:lang="ja-JP">XLIFF 文書を編集、または処理
     するアプリケーションです。</target>
   </trans-unit>
   <trans-unit id="4" maxbytes="36">
    <source xml:lang="en-US">XLIFF Data Manager</source>
    <target xml:lang="ja-JP">XLIFF データ・マネージャ</target>
   </trans-unit>
  </body>
 </file>
</xliff>

XLIFF 2.0 编辑

2014年5月6日,XLIFF 2.0规范转移到[4]OASIS标准候选。[5]

2014年8月6日,XLIFF 2.0规范成为OASIS标准[6]

XLIFF 2.0文档示例:

<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0"
 srcLang="en-US" trgLang="ja-JP">
 <file id="f1" original="Graphic Example.psd">
  <skeleton href="Graphic Example.psd.skl"/>
  <unit id="1">
   <segment>
    <source>Quetzal</source>
    <target>Quetzal</target>
   </segment>
  </unit>
  <unit id="2">
   <segment>
    <source>An application to manipulate and process XLIFF documents</source>
    <target>XLIFF 文書を編集、または処理 するアプリケーションです。</target>
   </segment>
  </unit>
  <unit id="3">
   <segment>
    <source>XLIFF Data Manager</source>
    <target>XLIFF データ・マネージャ</target>
   </segment>
  </unit>
 </file>
</xliff>

相关工具 编辑

文件操作和检查工具 编辑

编辑器 编辑

名称 操作系统 免费 描述
CafeTran Espresso页面存档备份,存于互联网档案馆 Windows、macOS、Linux 限制记忆和词汇大小
MateCat页面存档备份,存于互联网档案馆 Web MateCat支持XLIFF文件作为输入与输出格式。输入文件支持SDLXLIFF
MemoQ Windows 使用MQXLIFF完成互操作性和多种XLIFF的支持
Memsource英语Memsource Web、Windows、macOS、Linux 限制2个文件 MXLIFF是其原生格式
OmegaT (with Benten) Windows、macOS、Linux 跨平台和开源CAT工具
Pootle英语Pootle Web 基于Web的本地化平台
塔多思 Studio Windows SDLXLIFF是其原生格式
SmartCAT英语SmartCAT Web 云翻译环境
Swordfish Translation Editor英语Swordfish Translation Editor Windows、macOS、Linux 基于XLIFF的跨平台CAT工具
Transifex Web
Transit NXT页面存档备份,存于互联网档案馆 Windows
Virtaal英语Virtaal Windows、macOS、Linux 开源CAT工具
Weblate Web 基于Web的翻译工具
Wordfast Windows、macOS

程序库 编辑

2015年11月11日,Microsoft XLIFF 2.0对象模型在GitHub开源[9],其是一个.NET库,可以用来构建本地化工具、平台和系统。

参见 编辑

参考资料 编辑

  1. ^ 1.0 1.1 OASIS XLIFF 2.0 specifications. [2017-11-24]. (原始内容存档于2022-04-20). 
  2. ^ Bert Esselink. The Evolution of Localization (PDF). Guide to Localization. Multilingual Computing and Technology. 2003 [2017-11-13]. (原始内容 (PDF)存档于2012-09-07). Does the popularity of XLIFF signal a trend? Throughout the 1990s, the localization industry tried to turn translators into semi-engineers. Is it now expecting them to just translate again? It certainly looks that way. 
  3. ^ OASIS XLIFF 1.2 specification. [2017-11-24]. (原始内容存档于2022-04-25). 
  4. ^ 60-day Public Review for XLIFF Version 2.0 Candidate OASIS Standard announcement. [2017-11-24]. (原始内容存档于2021-03-14). 
  5. ^ Candidate OASIS Standard 01. [2017-11-24]. (原始内容存档于2021-05-14). 
  6. ^ Announcement of XLIFF 2.0 becoming an OASIS Standard. [2017-11-24]. (原始内容存档于2018-04-09). 
  7. ^ Okapi filters. [2017-11-13]. (原始内容存档于2016-05-01). 
  8. ^ Okapi components using XLIFF. [2017-11-13]. (原始内容存档于2015-09-07). 
  9. ^ XLIFF 2.0 Object Model is now Open Source on GitHub页面存档备份,存于互联网档案馆), Microsoft Language Portal Blog

外部链接 编辑