PHPackages                             voda/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. [Localization &amp; i18n](/categories/localization)
4. /
5. voda/gettext-extractor

ActiveLibrary[Localization &amp; i18n](/categories/localization)

voda/gettext-extractor
======================

tool for extracting gettext messages

v4.0.5(4y ago)2232.8k—0%20[2 PRs](https://github.com/voda/gettext-extractor/pulls)BSD-3-ClausePHPPHP &gt;=7.2.0

Since Mar 10Pushed 4y ago2 watchersCompare

[ Source](https://github.com/voda/gettext-extractor)[ Packagist](https://packagist.org/packages/voda/gettext-extractor)[ RSS](/packages/voda-gettext-extractor/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (7)Versions (13)Used By (0)

GettextExtractor
================

[](#gettextextractor)

Tool for extracting gettext phrases from PHP files and Latte templates. Output is generated as a .pot file.

[![Build Status](https://camo.githubusercontent.com/615693b76605d0c5f21829296f61f0760d9ad0438eb9a5668f19a28df5d79b5a/68747470733a2f2f7472617669732d63692e6f72672f766f64612f676574746578742d657874726163746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/voda/gettext-extractor)[![Latest Stable Version](https://camo.githubusercontent.com/cb701f84bf3f60bb1c7a2cef54ad8c257501717d79f439b34a5fd542de549f73/68747470733a2f2f706f7365722e707567782e6f72672f766f64612f676574746578742d657874726163746f722f762f737461626c65)](https://packagist.org/packages/voda/gettext-extractor)[![Total Downloads](https://camo.githubusercontent.com/4fbc0e9b0bdc7ec96d639d2cfca8c1699550711ad30cf07d96beba0fb9b7e48a/68747470733a2f2f706f7365722e707567782e6f72672f766f64612f676574746578742d657874726163746f722f646f776e6c6f616473)](https://packagist.org/packages/voda/gettext-extractor)[![License](https://camo.githubusercontent.com/be6b74090f1e1b3f83c67fbee8d62711d1728b39ffc36d50678b7340518afd27/68747470733a2f2f706f7365722e707567782e6f72672f766f64612f676574746578742d657874726163746f722f6c6963656e7365)](https://packagist.org/packages/voda/gettext-extractor)

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

[](#installation)

To install gettext-extractor install it with [composer](https://getcomposer.org/): `$ composer require --dev voda/gettext-extractor`

Alternatively you can download a standalone PHAR file from [releases page](https://github.com/voda/gettext-extractor/releases).

Usage
-----

[](#usage)

`./vendor/bin/gettext-extractor [options]`

```
Options:
  -h            display this help and exit
  -oFILE        output file, default output is stdout
  -lFILE        log file, default is stderr
  -fFILE        file to extract, can be specified several times
  -kFUNCTION    add FUNCTION to filters, format is:
                FILTER:FUNCTION_NAME:SINGULAR,PLURAL,CONTEXT
                default FILTERs are PHP and Latte
                for SINGULAR, PLURAL and CONTEXT '0' means not set
                can be specified several times
  -mKEY:VALUE   set meta header

```

e.g.: `./vendor/bin/gettext-extractor -o outup/file.pot -f files/to/extract/`

Supported file types
--------------------

[](#supported-file-types)

- .php
- .latte (Nette Latte templates)

License
-------

[](#license)

GettextExtractor is licensed under the New BSD License.

Based on code from [Karel Klíma](https://github.com/karelklima/gettext-extractor).

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity38

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 91.1% 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 ~318 days

Recently: every ~218 days

Total

12

Last Release

1671d ago

Major Versions

v3.1.4 → v4.0.02019-04-19

PHP version history (2 changes)v3.0.0PHP &gt;=5.2.2

v4.0.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/89d839ca1355079e36b5471770ef67b3cf407f46c1bad7d8531fa22451af0fd1?d=identicon)[voda](/maintainers/voda)

---

Top Contributors

[![voda](https://avatars.githubusercontent.com/u/290157?v=4)](https://github.com/voda "voda (144 commits)")[![finwe](https://avatars.githubusercontent.com/u/195675?v=4)](https://github.com/finwe "finwe (5 commits)")[![norbe](https://avatars.githubusercontent.com/u/194486?v=4)](https://github.com/norbe "norbe (3 commits)")[![JanMikes](https://avatars.githubusercontent.com/u/3995003?v=4)](https://github.com/JanMikes "JanMikes (2 commits)")[![martinkvapilglamicz](https://avatars.githubusercontent.com/u/49398237?v=4)](https://github.com/martinkvapilglamicz "martinkvapilglamicz (1 commits)")[![adamzelycz](https://avatars.githubusercontent.com/u/23708774?v=4)](https://github.com/adamzelycz "adamzelycz (1 commits)")[![ondrejcech](https://avatars.githubusercontent.com/u/4385840?v=4)](https://github.com/ondrejcech "ondrejcech (1 commits)")[![sharkodlak](https://avatars.githubusercontent.com/u/512785?v=4)](https://github.com/sharkodlak "sharkodlak (1 commits)")

---

Tags

l10ngettext

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[symfony/intl

Provides access to the localization data of the ICU library

2.6k199.8M1.1k](/packages/symfony-intl)[gettext/gettext

PHP gettext manager

70530.2M100](/packages/gettext-gettext)[gettext/languages

gettext languages with plural rules

7530.3M10](/packages/gettext-languages)[fisharebest/localization

A lightweight localization database and translation tools, with data from the CLDR, IANA, ISO, etc.

3191.1k2](/packages/fisharebest-localization)[maxakawizard/po-parser

Gettext \*.po parser for PHP

1771.5k](/packages/maxakawizard-po-parser)[delight-im/i18n

Internationalization and localization for PHP

625.2k3](/packages/delight-im-i18n)

PHPackages © 2026

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