charles-rumley/php-po-to-json

dev-master 2016-09-08 12:53 UTC

This package is not auto-updated.

Last update: 2024-04-22 11:53:09 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();