PHPackages                             sooyoos/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. sooyoos/extractor

ActiveLibrary

sooyoos/extractor
=================

Extract translations form the source code

2.0.2(5y ago)01.5kMITPHPPHP ^7.2

Since Dec 5Pushed 5y agoCompare

[ Source](https://github.com/Sooyoos/extractor)[ Packagist](https://packagist.org/packages/sooyoos/extractor)[ RSS](/packages/sooyoos-extractor/feed)WikiDiscussions support-php8 Synced 1w ago

READMEChangelogDependencies (10)Versions (20)Used By (0)

Translation extractor
=====================

[](#translation-extractor)

[![Latest Version](https://camo.githubusercontent.com/4b1c569a6deaf36e01329df1d74e4e8c6da0d65cfb8acd39129d5cd650ffbc14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7068702d7472616e736c6174696f6e2f657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://github.com/php-translation/extractor/releases)[![Build Status](https://camo.githubusercontent.com/b4e97a25b3e5453daea3140d98e713b0b49174fe3bf7a95d01cdf4f4bac2b83c/68747470733a2f2f7472617669732d63692e6f72672f7068702d7472616e736c6174696f6e2f657874726163746f722e7376673f6272616e63683d6d6173746572)](http://travis-ci.org/php-translation/extractor)[![Code Coverage](https://camo.githubusercontent.com/e20e42b14c8c5dc089caf6b4bc62c7332eb5413ca164a81e61e6012562561a5d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7068702d7472616e736c6174696f6e2f657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-translation/extractor)[![Quality Score](https://camo.githubusercontent.com/a2fd9e1eb6b56065bc348c824b9d41bef4458cb75b33d97343733af7273a1d98/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7068702d7472616e736c6174696f6e2f657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-translation/extractor)[![SensioLabsInsight](https://camo.githubusercontent.com/e2d25262cf1fe5ceb97d74f707052d95c488795933424870039ae9a37cb1bb00/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61356165306362652d663231332d346261362d393464612d6539636666656438363235362f6d696e692e706e67)](https://insight.sensiolabs.com/projects/a5ae0cbe-f213-4ba6-94da-e9cffed86256)[![Total Downloads](https://camo.githubusercontent.com/191cbc5b4a5ccbdb4b2a14702a21b88d33f1a5380381eea713ee21dcb572864d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d7472616e736c6174696f6e2f657874726163746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-translation/extractor)

**Extract translation messages from source code**

Install
-------

[](#install)

Via Composer

```
$ composer require php-translation/extractor
```

Usage
-----

[](#usage)

```
$extractor = new Extractor();

// Create extractor for PHP files
$fileExtractor = new PHPFileExtractor();

// Add visitors
$fileExtractor->addVisitor(new ContainerAwareTrans());
$fileExtractor->addVisitor(new ContainerAwareTransChoice());
$fileExtractor->addVisitor(new FlashMessage());
$fileExtractor->addVisitor(new FormTypeChoices());

// Add the file extractor to Extactor
$extractor->addFileExtractor($fileExtractor);

// Define where the source code is
$finder = new Finder();
$finder->in('/foo/bar');

//Start extracting files
$sourceCollection = $extractor->extract($finder);
```

Found an issue?
---------------

[](#found-an-issue)

Is it something we do not extract? Please add it as a tests. Add a new file with your example code in `tests/Resources/Github/Issue_XX.php` then edit the `AllExtractorsTest` to make sure the translation key is found.

```
// ...
$this->translationExists($sc, 'trans.issue_xx');
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 74% 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 ~71 days

Recently: every ~175 days

Total

19

Last Release

2168d ago

Major Versions

0.1.1 → 1.0.02017-01-04

1.7.1 → 2.0.02019-12-26

PHP version history (2 changes)0.1.0PHP ^5.5 || ^7.0

2.0.0PHP ^7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1867374?v=4)[sooyoos](/maintainers/Sooyoos)[@Sooyoos](https://github.com/Sooyoos)

---

Top Contributors

[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (91 commits)")[![Guite](https://avatars.githubusercontent.com/u/277531?v=4)](https://github.com/Guite "Guite (9 commits)")[![ostrolucky](https://avatars.githubusercontent.com/u/496233?v=4)](https://github.com/ostrolucky "ostrolucky (3 commits)")[![PowerKiKi](https://avatars.githubusercontent.com/u/72603?v=4)](https://github.com/PowerKiKi "PowerKiKi (3 commits)")[![noofaq](https://avatars.githubusercontent.com/u/1412384?v=4)](https://github.com/noofaq "noofaq (3 commits)")[![tkleinhakisa](https://avatars.githubusercontent.com/u/1912952?v=4)](https://github.com/tkleinhakisa "tkleinhakisa (2 commits)")[![bocharsky-bw](https://avatars.githubusercontent.com/u/3317635?v=4)](https://github.com/bocharsky-bw "bocharsky-bw (2 commits)")[![Sooyoos](https://avatars.githubusercontent.com/u/1867374?v=4)](https://github.com/Sooyoos "Sooyoos (2 commits)")[![welcoMattic](https://avatars.githubusercontent.com/u/773875?v=4)](https://github.com/welcoMattic "welcoMattic (1 commits)")[![cjean-wishibam](https://avatars.githubusercontent.com/u/31618269?v=4)](https://github.com/cjean-wishibam "cjean-wishibam (1 commits)")[![jdreesen](https://avatars.githubusercontent.com/u/424602?v=4)](https://github.com/jdreesen "jdreesen (1 commits)")[![marcw](https://avatars.githubusercontent.com/u/160332?v=4)](https://github.com/marcw "marcw (1 commits)")[![rbaarsma](https://avatars.githubusercontent.com/u/1061560?v=4)](https://github.com/rbaarsma "rbaarsma (1 commits)")[![samvdb](https://avatars.githubusercontent.com/u/632452?v=4)](https://github.com/samvdb "samvdb (1 commits)")[![Tomsgu](https://avatars.githubusercontent.com/u/2694769?v=4)](https://github.com/Tomsgu "Tomsgu (1 commits)")[![axi](https://avatars.githubusercontent.com/u/389340?v=4)](https://github.com/axi "axi (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sooyoos-extractor/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[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)[php-translation/extractor

Extract translations form the source code

1294.4M8](/packages/php-translation-extractor)[shopware/platform

The Shopware e-commerce core

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

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

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

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

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

PHPackages © 2026

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