DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: XLIFF

Author:Xavier Perseguers
Created:2009-10-13T09:25:24
Changed by:Xavier Perseguers
Changed:2011-11-08T12:21:56
Classification:xliff
Keywords:xliff, localization, translation, developer
Author:Xavier Perseguers
Email:xavier@typo3.org
Info 4:
Language:en

img-1 img-2 EXT: XLIFF - xliff

EXT: XLIFF

Extension Key: xliff

Language: en

Keywords: xliff, localization, translation, developer

Copyright 2011, Xavier Perseguers <xavier@typo3.org>

This document is published under the Open Content Licenseavailable from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.org

Table of Contents

EXT: XLIFF 1

`Introduction 3 <#__RefHeading__1168_1192591784>`_

What does it do? 3

Screenshots 3

`Developers manual 4 <#__RefHeading__1172_1192591784>`_

Integration within your Extension 4

How does it work? 4

How to switch from ll-XML to XLIFF? 4

`Known problems 5 <#__RefHeading__1180_1192591784>`_

`To-Do list 6 <#__RefHeading__1182_1192591784>`_

`Further information 7 <#__RefHeading__1184_1192591784>`_

`ChangeLog 8 <#__RefHeading__1186_1192591784>`_

Introduction

What does it do?

Since TYPO3 4.6, the official localization format is no more ll-XML (locallang*.xml files) but XLIFF (locallang*.xlf files).

XLIFF is used by Pootle, the TYPO3 translation server available at http://translation.typo3.org . It is expected that in a near future, XLIFF will allow extension developers to get access to a much better localization API, probably unified between Frontend and Backend and with some nice features such as support for placeholders, plural forms, ...

At the moment, there may at first seem to be no real advantage to switch to this format because it is only natively supported by TYPO3 4.6 and above. An extension may be packaged with both ll-XML and XLIFF localization files (actually this is what you get when you retrieve localization updates within Extension Manager) and if so, XLIFF will be used with a higher priority in TYPO3 4.6 whereas older versions will only “see” the ll-XML versions.

However, managing two different formats of localization files is cumbersome. This is why this extension has been created!

This extension lets you distribute your extensions with only XLIFF localization files and it will take care of dynamically creating the corresponding ll-XML versions when it is installed in TYPO3 4.4 or TYPO3 4.5. This way, you can start taking advantage of enhanced workflows to deal with localization such as using Virtaal for managing your texts and labels.

How does it work? Just add 'xliff' as dependency within your ext_emconf.php and forget about ll-XML localization files!

Screenshots

An extension is nothing without a screenshot. Here is the output of some extension of mine, that comes with XLIFF localization files and that is going to be installed (or updated) in TYPO3 4.5:

img-3

Developers manual

Integration within your Extension

Open your ext_emconf.php file and add a dependency to this extension:

$EM_CONF[$_EXTKEY] = array(
    'title' => 'Your Extension',
    ...
    'version' => 'x.y.z',
    'constraints' => array(
        'depends' => array(
            'php' => '5.2.0-',
            'typo3' => '4.4.0-4.6.99',
            ...
        ),
        'conflicts' => array(
            ...
        ),
        'suggests' => array(
            'xliff' => '1.0.1-',
        ),
    ),
    ...
);

If it makes sense for your extension, you may put the dependency into the 'depends' section of course. The problem is that it will somehow force the installation of this extension in TYPO3 4.6 even if the conversion will never be triggered in the end.

How does it work?

This extension XCLASSes Extension Manager to hook into the install process. It checks that:

  • Current extension is either local or global (does not make sense to show for a system extension)
  • Current extension contains XLIFF localization files
  • ll-XML conversion was not already performed for current extension's version (state is stored within typo3conf/xliff_conf.php)

How to switch from ll-XML to XLIFF?

Use extension extdeveval *newer than* 3.2.0 or use SVN trunk ( http://forge.typo3.org/projects/show/extension-extdeveval ). It comes with a handy tool to convert ll-XML localization files to XLIFF:

img-4

Then, you should simply delete the old ll-XML files.

Known problems

None at the moment. Please use the extension's bug tracker to report problems.

To-Do list

Please use the extension's bug tracker on Forge to propose new features.

Further information

Do not hesitate to visit the extension's website on Forge:

http://forge.typo3.org/projects/show/extension-xliff

Have more fun with TYPO3!

ChangeLog

The following is a high level overview of the changes in this extension. For more details, see the ChangeLog file included with the extension.

1.0.0

Version

1.0.0

Changes

First release on TER

8