{
    "mode": "info",
    "parameter": "msgexec",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/msgexec/json",
    "generated": "2026-11-10T02:12:59Z",
    "sections": {
        "File: gettext.info,  Node: msgexec Invocation,  Next: Colorizing,  Prev: msgen Invocation,  Up: Manipulating": {
            "content": "",
            "subsections": [
                {
                    "name": "9.10 Invoking the 'msgexec' Program",
                    "content": "msgexec [OPTION] COMMAND [COMMAND-OPTION]\n\nThe 'msgexec' program applies a command to all translations of a\ntranslation catalog.  The COMMAND can be any program that reads a\ntranslation from standard input.  It is invoked once for each\ntranslation.  Its output becomes msgexec's output.  'msgexec''s return\ncode is the maximum return code across all invocations.\n\nA special builtin command called '0' outputs the translation,\nfollowed by a null byte.  The output of 'msgexec 0' is suitable as input\nfor 'xargs -0'.\n\n'--newline'\nAdd newline at the end of each input line.\n\nDuring each COMMAND invocation, the environment variable\n'MSGEXECMSGID' is bound to the message's msgid, and the environment\nvariable 'MSGEXECLOCATION' is bound to the location in the PO file of\nthe message.  If the message has a context, the environment variable\n'MSGEXECMSGCTXT' is bound to the message's msgctxt, otherwise it is\nunbound.  If the message has a plural form, environment variable\n'MSGEXECMSGIDPLURAL' is bound to the message's msgidplural and\n'MSGEXECPLURALFORM' is bound to the order number of the plural\nactually processed (starting with 0), otherwise both are unbound.  If\nthe message has a previous msgid (added by 'msgmerge'), environment\nvariable 'MSGEXECPREVMSGCTXT' is bound to the message's previous\nmsgctxt, 'MSGEXECPREVMSGID' is bound to the previous msgid, and\n'MSGEXECPREVMSGIDPLURAL' is bound to the previous msgidplural.\n\nNote: It is your responsibility to ensure that the COMMAND can cope\nwith input encoded in the translation catalog's encoding.  If the\nCOMMAND wants input in a particular encoding, you can in a first step\nconvert the translation catalog to that encoding using the 'msgconv'\nprogram, before invoking 'msgexec'.  If the COMMAND wants input in the\nlocale's encoding, but you want to avoid the locale's encoding, then you\ncan first convert the translation catalog to UTF-8 using the 'msgconv'\nprogram and then make 'msgexec' work in an UTF-8 locale, by using the\n'LCALL' environment variable.\n\n\n'-i INPUTFILE'\n'--input=INPUTFILE'\nInput PO file.\n\n'-D DIRECTORY'\n'--directory=DIRECTORY'\nAdd DIRECTORY to the list of directories.  Source files are\nsearched relative to this list of directories.  The resulting '.po'\nfile will be written relative to the current directory, though.\n\nIf no INPUTFILE is given or if it is '-', standard input is read.\n\n\n'-P'\n'--properties-input'\nAssume the input file is a Java ResourceBundle in Java\n'.properties' syntax, not in PO file syntax.\n\n'--stringtable-input'\nAssume the input file is a NeXTstep/GNUstep localized resource file\nin '.strings' syntax, not in PO file syntax.\n\n\n'-h'\n'--help'\nDisplay this help and exit.\n\n'-V'\n'--version'\nOutput version information and exit.\n"
                }
            ]
        }
    },
    "flags": [],
    "examples": [],
    "see_also": []
}