Created by Oscar Otero http://oscarotero.comoom@oscarotero.com (MIT License)
Json loader and generator to use with gettext/gettext
composer require gettext/json
useGettext\Loader\PoLoader;
useGettext\Loader\JsonLoader;
useGettext\Generator\JsonGenerator;
useGettext\Translations;
//Load a .po file and export to .json$translations = (newPoLoader())->loadFile('locales/translations.po');
(newJsonGenerator())->generateFile($translations, 'locales/translations.json');
//You can load the json file with JsonLoader$loadedTranslations = (newJsonLoader())->loadFile('locales/translations.json');Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.