PHPackages                             digirati-labs/extract-twig-strings - 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. digirati-labs/extract-twig-strings

ActiveLibrary

digirati-labs/extract-twig-strings
==================================

Extract translatable resources to Gettext files from Twig templates

v1.0.2(7y ago)01.7k1PHP

Since Apr 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/digirati-co-uk/extract-twig-strings)[ Packagist](https://packagist.org/packages/digirati-labs/extract-twig-strings)[ RSS](/packages/digirati-labs-extract-twig-strings/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Extract twig string
===================

[](#extract-twig-string)

A console application to extract localizable resources from Twig templates

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

[](#installation)

```
composer require digirati-labs/extract-twig-strings

```

Usage
-----

[](#usage)

```
Usage:
  twig-extract [options] [--] []...

Arguments:
  paths                 Paths to the Twig templates to analyze

Options:
  -d, --domain=DOMAIN   The default domain to save translations under [default: "messages"]
  -l, --locale=LOCALE   The locale to associate with exported messages [default: "en_GB"]
  -o, --output=OUTPUT   Path to the directory that messages will be stored in [default: "/Users/stephen.fraser/github.com/digirati-co-uk/extract-twig-strings"]
  -R, --recursive       Search input paths recursively for Twig files
  -x, --format=FORMAT   The format to serialize messages to.  Defaults to: po.  Must be one of: po, mo, xliff, res [default: "po"]
  -h, --help            Display this help message
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Extracts `translate` calls from Twig templates

```

Example:

```
vendor/bin/twig-extract -o exported-translation path/to/templates

```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

3

Last Release

2585d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0e5a9b913301f2fb80dcb626b96d6e5b324522a8201e09f2761729bd1e8ce3b?d=identicon)[stephenwf](/maintainers/stephenwf)

---

Top Contributors

[![stephenwf](https://avatars.githubusercontent.com/u/8266711?v=4)](https://github.com/stephenwf "stephenwf (7 commits)")

### Embed Badge

![Health badge](/badges/digirati-labs-extract-twig-strings/health.svg)

```
[![Health](https://phpackages.com/badges/digirati-labs-extract-twig-strings/health.svg)](https://phpackages.com/packages/digirati-labs-extract-twig-strings)
```

###  Alternatives

[sylius/sylius

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

8.4k5.6M650](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)

PHPackages © 2026

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