Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 2 translation: why XLIFF?

Tags:

symfony

Here:

http://symfony.com/doc/current/book/translation.html they explain that XLIFF is the preferred way for translation, but they dont explain why. I personally think YML is easier, so I'm wondering why XLIFF is better (and it seems it's only here that it's better).

Any idea?

like image 583
Olivier Pons Avatar asked Aug 28 '13 08:08

Olivier Pons


2 Answers

Its because XLIFF is a standard when it comes to translation. I've got a translator friend and she is using xml translation tools as a standard at their work.

XLIFF (XML Localisation Interchange File Format) is an XML-based format created to standardize the way localizable data are passed between tools during a localization process.

Yml was not created especially to handle internationalized data.

More information on wikipedia : http://en.wikipedia.org/wiki/XLIFF

like image 145
sf_tristanb Avatar answered Oct 14 '22 03:10

sf_tristanb


This is (I guess) because other bundles work the best with the XLIFF format.

E.g.: JMSTranslationBundle

They say the following:

the best integration exists with the XLIFF format. This is simply due to the fact that the other formats are not so extensible, and do not allow for some of the more advanced features like tracking where a translation is used, whether it is new, etc.

like image 21
Baba Yaga Avatar answered Oct 14 '22 03:10

Baba Yaga