Skip to content
XLIFF i18n file generator
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
generated [add] gitignore Jun 16, 2014
.gitignore [fix] gitignore Jun 16, 2014 [add] readme in spanish Jun 17, 2014 [chg] update readme content with use instructions Jun 16, 2014 [add] readme in spanish Jun 17, 2014
xliff-generator.class.php [add] xliff i18n files generator Jun 16, 2014
xliff-generator.php [chg] sample parameters Jun 16, 2014


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

You can’t perform that action at this time.