PHPackages                             getpop/translation - 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. getpop/translation

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

getpop/translation
==================

Translation API for PoP components

0.8.9(4y ago)115.5k3GPL-2.0-or-laterPHPPHP ^8.0

Since Apr 14Pushed 4y ago1 watchersCompare

[ Source](https://github.com/getpop/translation)[ Packagist](https://packagist.org/packages/getpop/translation)[ Docs](https://github.com/getpop/translation)[ RSS](/packages/getpop-translation/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (5)Versions (25)Used By (3)

PoP Translation
===============

[](#pop-translation)

Contracts to implement translation for PoP components

Install
-------

[](#install)

Via Composer

```
composer require getpop/translation
```

Development
-----------

[](#development)

The source code is hosted on the [PoP monorepo](https://github.com/leoloso/PoP), under [`Engine/packages/translation`](https://github.com/leoloso/PoP/tree/master/layers/Engine/packages/translation).

Usage
-----

[](#usage)

Initialize the component:

```
\PoP\Root\App::stockAndInitializeComponentClasses([([
    \PoP\Translation\Component::class,
]);
```

Use it:

```
use PoP\Translation\Facades\TranslationAPIFacade;

// Get an instance of the service
$translationapi = TranslationAPI::getInstance();

// Translate text
$translatedText = $translationapi->__($text, $domain);
```

PHP versions
------------

[](#php-versions)

Requirements:

- PHP 8.0+ for development
- PHP 7.1+ for production

### Supported PHP features

[](#supported-php-features)

Check the list of [Supported PHP features in `leoloso/PoP`](https://github.com/leoloso/PoP/blob/master/docs/supported-php-features.md)

### Preview downgrade to PHP 7.1

[](#preview-downgrade-to-php-71)

Via [Rector](https://github.com/rectorphp/rector) (dry-run mode):

```
composer preview-code-downgrade
```

Standards
---------

[](#standards)

[PSR-1](https://www.php-fig.org/psr/psr-1), [PSR-4](https://www.php-fig.org/psr/psr-4) and [PSR-12](https://www.php-fig.org/psr/psr-12).

To check the coding standards via [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer), run:

```
composer check-style
```

To automatically fix issues, run:

```
composer fix-style
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

To execute [PHPUnit](https://phpunit.de/), run:

```
composer test
```

Static Analysis
---------------

[](#static-analysis)

To execute [PHPStan](https://github.com/phpstan/phpstan), run:

```
composer analyse
```

Report issues
-------------

[](#report-issues)

To report a bug or request a new feature please do it on the [PoP monorepo issue tracker](https://github.com/leoloso/PoP/issues).

Contributing
------------

[](#contributing)

We welcome contributions for this package on the [PoP monorepo](https://github.com/leoloso/PoP) (where the source code for this package is hosted).

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CODE\_OF\_CONDUCT](CODE_OF_CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Leonardo Losoviz](https://github.com/leoloso)

License
-------

[](#license)

GNU General Public License v2 (or later). Please see [License File](LICENSE.md) for more information.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

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 ~26 days

Total

24

Last Release

1622d ago

PHP version history (4 changes)v0.1.0PHP ~7.1

0.1.6PHP ~7.2

0.7.6PHP ^7.4|^8.0

0.8.1PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1981996?v=4)[Leonardo Losoviz](/maintainers/leoloso)[@leoloso](https://github.com/leoloso)

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

---

Top Contributors

[![leoloso](https://avatars.githubusercontent.com/u/1981996?v=4)](https://github.com/leoloso "leoloso (172 commits)")

---

Tags

poptranslationtranslationpop

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/getpop-translation/health.svg)

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

###  Alternatives

[gettext/gettext

PHP gettext manager

70530.2M100](/packages/gettext-gettext)[inpsyde/multilingual-press

Simply THE multisite-based free open source plugin for your multilingual websites.

2414.0k1](/packages/inpsyde-multilingual-press)[wcm/wcm-lang-switch

Adds a button to the admin toolbar. This buttons allows users to seamlessly switch between available languages..

212.0k](/packages/wcm-wcm-lang-switch)

PHPackages © 2026

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