PHPackages                             gettext/json - 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. gettext/json

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

gettext/json
============

Json format for gettext

v1.0.1(5y ago)5177.3k↓26.3%12MITPHPPHP ^7.2|^8.0

Since Nov 5Pushed 5y ago2 watchersCompare

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

READMEChangelog (2)Dependencies (5)Versions (3)Used By (2)

Gettext Json format
===================

[](#gettext-json-format)

[![Latest Version on Packagist](https://camo.githubusercontent.com/101f796b572a3583908ff191cb234ce131cc364b0d235805271cbe258fb96959/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676574746578742f6a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gettext/json)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://github.com/php-gettext/Json/workflows/testing/badge.svg)](https://github.com/php-gettext/Json/workflows/testing/badge.svg)[![Quality Score](https://camo.githubusercontent.com/65636c71b91e78d3064fd2a7fdd54f949416910f0f7946b3a53cef94f76f76e2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7068702d676574746578742f4a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-gettext/Json)[![Total Downloads](https://camo.githubusercontent.com/85c07b9e80b20e9256d280fe9f338bd4ca7d4aa8219dbd0198e6c25e999d49c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676574746578742f6a736f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gettext/json)

Created by Oscar Otero   (MIT License)

Json loader and generator to use with [gettext/gettext](https://github.com/php-gettext/Gettext)

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

[](#installation)

```
composer require gettext/json

```

Usage example
-------------

[](#usage-example)

```
use Gettext\Loader\PoLoader;
use Gettext\Loader\JsonLoader;
use Gettext\Generator\JsonGenerator;
use Gettext\Translations;

//Load a .po file and export to .json
$translations = (new PoLoader())->loadFile('locales/translations.po');
(new JsonGenerator())->generateFile($translations, 'locales/translations.json');

//You can load the json file with JsonLoader
$loadedTranslations = (new JsonLoader())->loadFile('locales/translations.json');
```

---

Please see [CHANGELOG](CHANGELOG.md) for more information about recent changes and [CONTRIBUTING](CONTRIBUTING.md) for contributing details.

The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

1942d ago

PHP version history (2 changes)v1.0.0PHP ^7.2

v1.0.1PHP ^7.2|^8.0

### Community

Maintainers

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

---

Top Contributors

[![oscarotero](https://avatars.githubusercontent.com/u/377873?v=4)](https://github.com/oscarotero "oscarotero (3 commits)")

---

Tags

gettexti18njsonjsoni18ntranslationgettextloader

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[gettext/gettext

PHP gettext manager

70130.2M102](/packages/gettext-gettext)[om/potrans

Command line tool for translate Gettext with Google Translator API or DeepL API

10515.0k4](/packages/om-potrans)[gettext/php-scanner

PHP scanner for gettext

15471.2k12](/packages/gettext-php-scanner)[fisharebest/localization

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

3191.1k2](/packages/fisharebest-localization)[leaseweb/gettext-translation-bundle

Easy to use and native (faster) gettext translation support

2460.6k](/packages/leaseweb-gettext-translation-bundle)[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)
