1 Twig Gettext Extractor [![Build Status](https://secure.travis-ci.org/umpirsky/Twig-Gettext-Extractor.png?branch=master)](http://travis-ci.org/umpirsky/Twig-Gettext-Extractor)
4 The Twig Gettext Extractor is [Poedit](http://www.poedit.net/download.php)
5 friendly tool which extracts translations from twig templates.
9 The recommended way to install Twig Gettext Extractor is through
10 [composer](http://getcomposer.org).
15 "umpirsky/twig-gettext-extractor": "1.1.*"
22 By default, Poedit does not have the ability to parse Twig templates.
23 This can be resolved by adding an additional parser (Edit > Preferences > Parsers)
24 with the following options:
27 - List of extensions: `*.twig`
29 - Parser command: `<project>/vendor/bin/twig-gettext-extractor --sort-output --force-po -o %o %C %K -L PHP --files %F`
30 - An item in keyword list: `-k%k`
31 - An item in input file list: `%f`
32 - Source code charset: `--from-code=%c`
34 <img src="http://i.imgur.com/f9px2.png" />
36 Now you can update your catalog and Poedit will synchronize it with your twig
41 To run the test suite, you need [composer](http://getcomposer.org) and
42 [PHPUnit](https://github.com/sebastianbergmann/phpunit).
44 $ composer install --dev
49 Twig Gettext Extractor is licensed under the MIT license.