Symfony XLIFF

Symfony XLIFF files. Supporting keynames using resname attribute.

File Extensions .xlf, .xliff
API Extension symfony_xliff
Format Options enclose_in_cdata, include_translation_state
Import Yes
Export Yes
Pluralization supported? No
Descriptions/Comments supported? Yes


<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
  <file original="global" datatype="plaintext" source-language="de-DE" target-language="en-GB">
      <trans-unit id="commented_key" resname="commented_key">
        <source xml:lang="de-DE">Schau dir das mal an! Dieser Schlüssel hat einen Kommentar!</source>
        <target xml:lang="en-GB">Check it out! This key has a comment! (At least in some formats)</target>
        <note>This is the amazing comment for this commented key!</note>
      <trans-unit id="empty_string_translation" resname="empty_string_translation">
        <source xml:lang="de-DE"/>
        <target xml:lang="en-GB"/>
      <trans-unit id="key_with_line-break" resname="key_with_line-break">
        <source xml:lang="de-DE">Diese Übersetzung hat
einen Zeilenumbruch.</source>
        <target xml:lang="en-GB">This translations contains
a line-break.</target>
      <trans-unit id="nested.deeply.key" resname="nested.deeply.key">
        <source xml:lang="de-DE">Wow, dieser Schlüssel ist noch tiefer verschachtelt.</source>
        <target xml:lang="en-GB">Wow, this key is nested even deeper.</target>
      <trans-unit id="nested.key" resname="nested.key">
        <source xml:lang="de-DE">Dieser Schlüssel ist innerhalb eines Namensraumes verschachtelt.</source>
        <target xml:lang="en-GB">This key is nested inside a namespace.</target>
      <trans-unit id="null_translation" resname="null_translation">
        <source xml:lang="de-DE"/>
        <target xml:lang="en-GB"/>
      <trans-unit id="sample_collection" resname="sample_collection">
        <source xml:lang="de-DE">---
- erstes Item
- zweites Item
        <target xml:lang="en-GB">---
- first item
- second item
- third item
      <trans-unit id="simple_key" resname="simple_key">
        <source xml:lang="de-DE">Nur ein einfacher Schlüssel mit einer einfachen Nachricht.</source>
        <target xml:lang="en-GB">Just a simple key with a simple message.</target>
      <trans-unit id="unverified_key" resname="unverified_key">
        <source xml:lang="de-DE">Diese Übersetzung ist noch nicht bestätigt und wartet drauf!</source>
        <target xml:lang="en-GB">This translation is not yet verified and waits for it. (In some formats we also export this status)</target>

Format Options

Option Type Upload Download Default Description
enclose_in_cdata boolean close check false Encloses translations containing html tags in CDATA
include_translation_state boolean close check false Include state of translations in the target locale

Further Reading