XLIFF (XML Localisation Interchange File Format) i18n files generator.

This project was created from the need to make the internationalization of website (developed with Silex PHP micro-framework and Twig template language), which now has its content in Portuguese, English and Spanish.


PHP 5.3 >=

Installation / Usage

  1. Run git clone

  2. The "generated" folder require 777 write permission

  3. Alter the xliff-generator.php configuration file


//this regex to search all words into "->trans(' ... ')" used in Silex Micro-Framework

//this regex to search all words into "{' ... '|trans}" used in Twig Template Language
$xliff_generator->addRegex("\{ *['\"](.*)['\"] *\|trans\}");


$ php xliff-generator.php

Virtaal to make translation

Virtaal is easy-to-use and powerful offline translation tool. It's found here


  1. Install Virtaal # aptitude install virtaal or use repository documentation here

  2. Open Virtaal program and select the generated files with xliff-file-gerador