Download the PHP package unit27/twig-gettext-extractor without Composer
On this page you can find all versions of the php package unit27/twig-gettext-extractor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download unit27/twig-gettext-extractor
More information about unit27/twig-gettext-extractor
Files in unit27/twig-gettext-extractor
Package twig-gettext-extractor
Short Description The Twig Gettext Extractor is Poedit friendly tool which extracts translations from twig templates.
License MIT
Informations about the package twig-gettext-extractor
unit27: Twig Gettext Extractor (PHP)
The Twig Gettext Extractor is Poedit friendly tool which extracts translations from twig templates.
Installation
The recommended way to install Twig Gettext Extractor is through composer.
Setup
By default, Poedit does not have the ability to parse Twig templates. This can be resolved by adding an additional parser (Edit > Preferences > Parsers) with the following options:
- Language:
Twig - List of extensions:
*.twig - Invocation:
- Parser command:
<project>/vendor/bin/twig-gettext-extractor --sort-output --force-po -o %o %C %K -L PHP --files %F - An item in keyword list:
-k%k - An item in input file list:
%f - Source code charset:
--from-code=%c
- Parser command:
Now you can update your catalog and Poedit will synchronize it with your twig templates.
Tests
To run the test suite, you need composer and PHPUnit.
$ composer install --dev
$ phpunit
License
Twig Gettext Extractor is licensed under the MIT license.
All versions of twig-gettext-extractor with dependencies
twig/twig Version >=1.2.0,<2.0-dev
twig/extensions Version 1.0.*
symfony/twig-bridge Version >=2.0,<3.0
symfony/routing Version >=2.0,<3.0
symfony/filesystem Version >=2.0,<3.0
symfony/translation Version >=2.0,<3.0
symfony/form Version >=2.0,<3.0