NAME
po2json - Convert a PO file to the JSON data for Locale::Simple in the browser
VERSION
version 0.200
SYNOPSIS
Deprecated: use locale-simple instead. locale-simple po2json --pretty FILE.po writes exactly what po2json -p FILE.po writes. po2json FILE.po has no exact equivalent: locale-simple po2json FILE.po writes the same data wrapped as { "FILE": ... } (--domain NAME sets the key), the shape the JavaScript loadLocaleData takes. Every call prints a deprecation notice on STDERR; the output and the exit codes are unchanged.
po2json messages.po > messages.json
po2json -p messages.po > messages.json
DESCRIPTION
Reads a PO file and writes the JSON data for the JavaScript side of Locale::Simple to STDOUT. Entries without a translation, fuzzy entries and obsolete entries are left out, as msgfmt leaves them out of a .mo file.
With -p the output is indented and wrapped in the file name (without .po or .pot) as domain. -h prints the usage and exits with 1, as does an unreadable or malformed file, with the reason on STDERR.
See locale-simple for the same conversion as a subcommand.
SUPPORT
Issues
Please report bugs and feature requests at https://github.com/Getty/locale-simple/issues.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2026 by Torsten Raudssus https://raudssus.de/.
This is free software, licensed under:
The MIT (X11) License