Skip to content

Instantly share code, notes, and snippets.

@wouterj
Created October 12, 2014 13:59
Show Gist options
  • Select an option

  • Save wouterj/b17ef692a0f839d9df52 to your computer and use it in GitHub Desktop.

Select an option

Save wouterj/b17ef692a0f839d9df52 to your computer and use it in GitHub Desktop.
<?xml version="1.0" ?>
<xliff version='1.1' xmlns='urn:oasis:names:tc:xliff:document:1.1'>
<file original='NoName' source-language='en' datatype='plaintext'>
<body>
<!-- In Symfony -->
<trans-unit id="apples">
<source>I have %number% apples</source>
<target>{0} I have no apples|{1} I have one apple|]1,Inf] I have %count% apples</target>
</trans-unit>
<!-- Correct Xliff -->
<group restype="x-gettext-plurals" id="apples">
<trans-unit id="apples[0]">
<source>I have no apples</source>
<target>I have no apples</target>
</trans-unit>
<trans-unit id="apples[1]">
<source>I have one apple</source>
<target>I have one apple</target>
</trans-unit>
<trans-unit id="apples[n]">
<source>I have %count% apples</source>
<target>I have %count% apples</target>
</trans-unit>
</group>
</body>
</file>
</xliff>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment