po - GNU PO file manager


    po [ --debug|--nodebug, --verbose|--noverbose, -v, --help, --man]

    Basic options:
    --add                   Add an msgsid/msgstr entry in the po file
    --as-po                 Write the file as a po file
    --as-json               Write the po file as json on the STDOUT
    --compile               Create a machine object file (.mo)
    --domain                The po file domain
    --dump                  Dump the PO file in a format suitable for a .po file
    --init                  Create an initial po file such as .pot
    --bugs-to               Sets the value for the meta field C<Report-Msgid-Bugs-To>
    --charset               Sets the character encoding value in C<Content-Type>
    --created-on            Sets the value for the meta field C<POT-Creation-Date>
    --domain                The domain, such as C<com.example.api>
    --encoding              Sets the value for the meta field C<Content-Transfer-Encoding>
    --header                The string to be used as the header for the C<.po> file only.
    --lang                  The locale to use, such as en_US
    --msgid                 The C<msgid> to add
    --msgstr                The localised text to add for the given C<msgid>
    --output                The output file
    --output-dir            Output directory
    --overwrite             Boolean. If true, this will allow overwriting existing file
    --po-debug              Integer representing the debug value to be passed to L<Text::PO>
    --pot                   The C<.pot> file to be used as a template in conjonction with --init
    --project               Sets the value for the meta field C<Project-Id-Version>
    --revised-on            Sets the value for the meta field C<PO-Revision-Date>
    --settings              The settings json file containing default values
    --team                  Sets the value for the meta field C<Language-Team>
    --translator            Sets the value for the meta field C<Last-Translator>
    --tz, --time-zone, --timezone Sets the time zone to use for the date in C<PO-Revision-Date> and C<POT-Creation-Date>
    --version               Sets the version to be used in the meta field C<Project-Id-Version>
    Standard options:
    -h, --help              display this help and exit
    -v                      display version information and exit
    --debug                 Enable debug mode
    --nodebug               Disable debug mode
    --help, -?              Show this help
    --man                   Show this help as a man page
    --verbose               Enable verbose mode
    --noverbose             Disable verbose mode





Adds an msgid and msgstr pair to the po file

    po --add --msgid "Hello!" --msgstr "Salut !" --output fr_FR/LC_MESSAGES/com.example.api.po


Takes a po file and transcode it as a json po file

    po --as-json --output fr_FR/LC_MESSAGES/com.example.api.json fr_FR.po


Takes a .mo or .json file and transcode it to a po file

    po --as-po --output fr_FR.po ./fr_FR/com.example.api.json


Dump the data contained as a GNU PO file to the STDOUT

    po --dump /some/file.po >new_file.po
    # Maybe?
    diff /some/file.po new_file.po


The output directory. For example to read multiple po file and create their related mo files under a given directory:

    po --compile --output-dir ./en_GB/LC_MESSAGES en_GB.*.po

This will read all the po files for language en_GB as selected in write their related mo files under ./en_GB/LC_MESSAGES. This directory will be created if it does not exist. The domain will be derived from the po file.


Print a short help message.


Enable debug mode with considerable verbosity


Disable debug mode.


Enable verbose mode.


Disable verbose mode.


Print this help as man page.


This program takes optional parameters and process GNU PO files.

GNU PO files are localisation or l10n files. They can be used as binary after been compiled, or they can be converted to json using this utility which then can read the json data instead of parsing the po files, making it faster to load.


    po [--dump, --debug|--nodebug, --verbose|--noverbose, -v, --help, --man] /some/file.po


Jacques Deguest <>


Copyright (c) 2020-2021 DEGUEST Pte. Ltd.