PHPackages                             unit27/twig-gettext-extractor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. unit27/twig-gettext-extractor

ActiveApplication[Templating &amp; Views](/categories/templating)

unit27/twig-gettext-extractor
=============================

The Twig Gettext Extractor is Poedit friendly tool which extracts translations from twig templates.

1.1.3(13y ago)0622MITPHPPHP &gt;=5.3.3

Since Aug 29Pushed 9y agoCompare

[ Source](https://github.com/unit27/Twig-Gettext-Extractor)[ Packagist](https://packagist.org/packages/unit27/twig-gettext-extractor)[ RSS](/packages/unit27-twig-gettext-extractor/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (8)Versions (6)Used By (0)

unit27: Twig Gettext Extractor (PHP)
====================================

[](#unit27-twig-gettext-extractor-php)

The Twig Gettext Extractor is [Poedit](http://www.poedit.net/download.php)friendly tool which extracts translations from twig templates.

Installation
------------

[](#installation)

The recommended way to install Twig Gettext Extractor is through [composer](http://getcomposer.org).

```
{
    "require": {
        "unit27/twig-gettext-extractor": "1.1.*"
    }
}
```

Setup
-----

[](#setup)

By default, Poedit does not have the ability to parse Twig templates. This can be resolved by adding an additional parser (Edit &gt; Preferences &gt; Parsers) with the following options:

- Language: `Twig`
- List of extensions: `*.twig`
- Invocation:
    - Parser command: `/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`

[![](https://camo.githubusercontent.com/60219b9af4599255341ef6c470d9b2a920c6fdfe0d129b8617ad434f7ef9e9aa/687474703a2f2f692e696d6775722e636f6d2f66397078322e706e67)](https://camo.githubusercontent.com/60219b9af4599255341ef6c470d9b2a920c6fdfe0d129b8617ad434f7ef9e9aa/687474703a2f2f692e696d6775722e636f6d2f66397078322e706e67)

Now you can update your catalog and Poedit will synchronize it with your twig templates.

Tests
-----

[](#tests)

To run the test suite, you need [composer](http://getcomposer.org) and [PHPUnit](https://github.com/sebastianbergmann/phpunit).

```
$ composer install --dev
$ phpunit

```

License
-------

[](#license)

Twig Gettext Extractor is licensed under the MIT license.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Total

5

Last Release

4884d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5442b886ab27966b85cfbf86172c7f6d4b7f9d2030367c66b8d7e6e7e05f7593?d=identicon)[unit27](/maintainers/unit27)

---

Top Contributors

[![umpirsky](https://avatars.githubusercontent.com/u/208957?v=4)](https://github.com/umpirsky "umpirsky (50 commits)")[![jasny](https://avatars.githubusercontent.com/u/100821?v=4)](https://github.com/jasny "jasny (1 commits)")

### Embed Badge

![Health badge](/badges/unit27-twig-gettext-extractor/health.svg)

```
[![Health](https://phpackages.com/badges/unit27-twig-gettext-extractor/health.svg)](https://phpackages.com/packages/unit27-twig-gettext-extractor)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M378](/packages/easycorp-easyadmin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M715](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M526](/packages/shopware-core)[chameleon-system/chameleon-base

The Chameleon System core.

1027.9k4](/packages/chameleon-system-chameleon-base)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M464](/packages/pimcore-pimcore)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
