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="[email protected]">
     <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

外部連結 編輯