charles-rumley / php-po-to-json
Installs: 72 554
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 2
Open Issues: 0
Type:package
Requires
- php: >=5.3.0
- sepia/po-parser: ^4.2
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2025-04-07 16:44:45 UTC
README
Convert PO files to Jed-compatible JSON using PHP.
Inspired by: - github.com/mikeedwards/po2json
Installation
composer require charles-rumley/php-po-to-json
Usage
use CharlesRumley\PoToJson;
$poToJson = new PoToJson();
// Convert a PO file to JSON
$rawJson = $poToJson->withPoFile($path)->toRawJson();
// Convert a PO file to Jed-compatible JSON
$jedJson = $poToJson->withPoFile($path)->toJedJson();