PHPackages                             panlatent/translator - 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. panlatent/translator

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

panlatent/translator
====================

08PHP

Since Aug 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/panlatent/translator)[ Packagist](https://packagist.org/packages/panlatent/translator)[ RSS](/packages/panlatent-translator/feed)WikiDiscussions cli Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

Translator
==========

[](#translator)

Translator is command tools that can extract message strings from PHP source code and Twig templates. It is designed to work with tools like Poedit and supports CraftCMS.

Requirements
------------

[](#requirements)

- PHP 8.2 or later

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

[](#installation)

```
composer global require panlatent/translator:cli
```

Usages
------

[](#usages)

Add custom extractor on Poedit.

```
./translator extract %F --output=%o
```

Add config to `config/app.php`:

```
   'components' => [
        'i18n' => [
            'translations' => [
                'site' => [
                    'class' => GettextMessageSource::class,
                    'sourceLanguage' => 'en-US',
                    'basePath' => '@translations',
                ],
                '*' => [
                    'class' => GettextMessageSource::class,
                    'sourceLanguage' => 'en-US',
                    'basePath' => '@translations',
                ],
            ]
        ],
    ],
```

License
-------

[](#license)

The Translator is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![panlatent](https://avatars.githubusercontent.com/u/4393268?v=4)](https://github.com/panlatent "panlatent (6 commits)")

---

Tags

craftcmsgettexti18npoedittranslationyii2

### Embed Badge

![Health badge](/badges/panlatent-translator/health.svg)

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

###  Alternatives

[smmoosavi/php-gettext

Wrapper for php-gettext by danilo segan. This library provides PHP functions to read MO files even when gettext is not compiled in or when appropriate locale is not present on the system.

1927.0k1](/packages/smmoosavi-php-gettext)

PHPackages © 2026

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