{
    "content": [
        {
            "type": "text",
            "text": "# msgfmt (info)\n\n## Sections\n\n- **File: gettext.info,  Node: msgfmt Invocation,  Next: msgunfmt Invocation,  Up: Binaries** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "msgfmt",
        "section": "",
        "mode": "info",
        "summary": null,
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "File: gettext.info,  Node: msgfmt Invocation,  Next: msgunfmt Invocation,  Up: Binaries",
                "lines": 1,
                "subsections": [
                    {
                        "name": "10.1 Invoking the 'msgfmt' Program",
                        "lines": 296
                    }
                ]
            }
        ],
        "sections": {
            "File: gettext.info,  Node: msgfmt Invocation,  Next: msgunfmt Invocation,  Up: Binaries": {
                "content": "",
                "subsections": [
                    {
                        "name": "10.1 Invoking the 'msgfmt' Program",
                        "content": "msgfmt [OPTION] FILENAME.po ...\n\nThe 'msgfmt' programs generates a binary message catalog from a\ntextual translation description.\n\n\n'FILENAME.po ...'\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\nbinary file will be written relative to the current directory,\nthough.\n\nIf an input file is '-', standard input is read.\n\n\n'-j'\n'--java'\nJava mode: generate a Java 'ResourceBundle' class.\n\n'--java2'\nLike -java, and assume Java2 (JDK 1.2 or higher).\n\n'--csharp'\nC# mode: generate a .NET .dll file containing a subclass of\n'GettextResourceSet'.\n\n'--csharp-resources'\nC# resources mode: generate a .NET '.resources' file.\n\n'--tcl'\nTcl mode: generate a tcl/msgcat '.msg' file.\n\n'--qt'\nQt mode: generate a Qt '.qm' file.\n\n'--desktop'\nDesktop Entry mode: generate a '.desktop' file.\n\n'--xml'\nXML mode: generate an XML file.\n\n\n'-o FILE'\n'--output-file=FILE'\nWrite output to specified file.\n\n'--strict'\nDirect the program to work strictly following the Uniforum/Sun\nimplementation.  Currently this only affects the naming of the\noutput file.  If this option is not given the name of the output\nfile is the same as the domain name.  If the strict Uniforum mode\nis enabled the suffix '.mo' is added to the file name if it is not\nalready present.\n\nWe find this behaviour of Sun's implementation rather silly and so\nby default this mode is not selected.\n\nIf the output FILE is '-', output is written to standard output.\n\n\n'-r RESOURCE'\n'--resource=RESOURCE'\nSpecify the resource name.\n\n'-l LOCALE'\n'--locale=LOCALE'\nSpecify the locale name, either a language specification of the\nform LL or a combined language and country specification of the\nform LLCC.\n\n'-d DIRECTORY'\nSpecify the base directory of classes directory hierarchy.\n\n'--source'\nProduce a .java source file, instead of a compiled .class file.\n\nThe class name is determined by appending the locale name to the\nresource name, separated with an underscore.  The '-d' option is\nmandatory.  The class is written under the specified directory.\n\n\n'-r RESOURCE'\n'--resource=RESOURCE'\nSpecify the resource name.\n\n'-l LOCALE'\n'--locale=LOCALE'\nSpecify the locale name, either a language specification of the\nform LL or a combined language and country specification of the\nform LLCC.\n\n'-d DIRECTORY'\nSpecify the base directory for locale dependent '.dll' files.\n\nThe '-l' and '-d' options are mandatory.  The '.dll' file is written\nin a subdirectory of the specified directory whose name depends on the\nlocale.\n\n\n'-l LOCALE'\n'--locale=LOCALE'\nSpecify the locale name, either a language specification of the\nform LL or a combined language and country specification of the\nform LLCC.\n\n'-d DIRECTORY'\nSpecify the base directory of '.msg' message catalogs.\n\nThe '-l' and '-d' options are mandatory.  The '.msg' file is written\nin the specified directory.\n\n\n'--template=TEMPLATE'\nSpecify a .desktop file used as a template.\n\n'-k[KEYWORDSPEC]'\n'--keyword[=KEYWORDSPEC]'\nSpecify KEYWORDSPEC as an additional keyword to be looked for.\nWithout a KEYWORDSPEC, the option means to not use default\nkeywords.\n\n'-l LOCALE'\n'--locale=LOCALE'\nSpecify the locale name, either a language specification of the\nform LL or a combined language and country specification of the\nform LLCC.\n\n'-d DIRECTORY'\nSpecify the directory where PO files are read.  The directory must\ncontain the 'LINGUAS' file.\n\nTo generate a '.desktop' file for a single locale, you can use it as\nfollows.\n\nmsgfmt --desktop --template=TEMPLATE --locale=LOCALE \\\n-o FILE FILENAME.po ...\n\nmsgfmt provides a special \"bulk\" operation mode to process multiple\n'.po' files at a time.\n\nmsgfmt --desktop --template=TEMPLATE -d DIRECTORY -o FILE\n\nmsgfmt first reads the 'LINGUAS' file under DIRECTORY, and then\nprocesses all '.po' files listed there.  You can also limit the locales\nto a subset, through the 'LINGUAS' environment variable.\n\nFor either operation modes, the '-o' and '--template' options are\nmandatory.\n\n\n'--template=TEMPLATE'\nSpecify an XML file used as a template.\n\n'-L NAME'\n'--language=NAME'\nSpecifies the language of the input files.\n\n'-l LOCALE'\n'--locale=LOCALE'\nSpecify the locale name, either a language specification of the\nform LL or a combined language and country specification of the\nform LLCC.\n\n'-d DIRECTORY'\nSpecify the base directory of '.po' message catalogs.\n\nTo generate an XML file for a single locale, you can use it as\nfollows.\n\nmsgfmt --xml --template=TEMPLATE --locale=LOCALE \\\n-o FILE FILENAME.po ...\n\nmsgfmt provides a special \"bulk\" operation mode to process multiple\n'.po' files at a time.\n\nmsgfmt --xml --template=TEMPLATE -d DIRECTORY -o FILE\n\nmsgfmt first reads the 'LINGUAS' file under DIRECTORY, and then\nprocesses all '.po' files listed there.  You can also limit the locales\nto a subset, through the 'LINGUAS' environment variable.\n\nFor either operation modes, the '-o' and '--template' options are\nmandatory.\n\n\n'-P'\n'--properties-input'\nAssume the input files are Java ResourceBundles in Java\n'.properties' syntax, not in PO file syntax.\n\n'--stringtable-input'\nAssume the input files are NeXTstep/GNUstep localized resource\nfiles in '.strings' syntax, not in PO file syntax.\n\n\n'-c'\n'--check'\nPerform all the checks implied by '--check-format',\n'--check-header', '--check-domain'.\n\n'--check-format'\nCheck language dependent format strings.\n\nIf the string represents a format string used in a 'printf'-like\nfunction both strings should have the same number of '%' format\nspecifiers, with matching types.  If the flag 'c-format' or\n'possible-c-format' appears in the special comment <#,> for this\nentry a check is performed.  For example, the check will diagnose\nusing '%.*s' against '%s', or '%d' against '%s', or '%d' against\n'%x'.  It can even handle positional parameters.\n\nNormally the 'xgettext' program automatically decides whether a\nstring is a format string or not.  This algorithm is not perfect,\nthough.  It might regard a string as a format string though it is\nnot used in a 'printf'-like function and so 'msgfmt' might report\nerrors where there are none.\n\nTo solve this problem the programmer can dictate the decision to\nthe 'xgettext' program (*note c-format::).  The translator should\nnot consider removing the flag from the <#,> line.  This \"fix\"\nwould be reversed again as soon as 'msgmerge' is called the next\ntime.\n\n'--check-header'\nVerify presence and contents of the header entry.  *Note Header\nEntry::, for a description of the various fields in the header\nentry.\n\n'--check-domain'\nCheck for conflicts between domain directives and the\n'--output-file' option\n\n'-C'\n'--check-compatibility'\nCheck that GNU msgfmt behaves like X/Open msgfmt.  This will give\nan error when attempting to use the GNU extensions.\n\n'--check-accelerators[=CHAR]'\nCheck presence of keyboard accelerators for menu items.  This is\nbased on the convention used in some GUIs that a keyboard\naccelerator in a menu item string is designated by an immediately\npreceding '&' character.  Sometimes a keyboard accelerator is also\ncalled \"keyboard mnemonic\".  This check verifies that if the\nuntranslated string has exactly one '&' character, the translated\nstring has exactly one '&' as well.  If this option is given with a\nCHAR argument, this CHAR should be a non-alphanumeric character and\nis used as keyboard accelerator mark instead of '&'.\n\n'-f'\n'--use-fuzzy'\nUse fuzzy entries in output.  Note that using this option is\nusually wrong, because fuzzy messages are exactly those which have\nnot been validated by a human translator.\n\n\n'-a NUMBER'\n'--alignment=NUMBER'\nAlign strings to NUMBER bytes (default: 1).\n\n'--endianness=BYTEORDER'\nWrite out 32-bit numbers in the given byte order.  The possible\nvalues are 'big' and 'little'.  The default is 'little'.\n\nMO files of any endianness can be used on any platform.  When a MO\nfile has an endianness other than the platform's one, the 32-bit\nnumbers from the MO file are swapped at runtime.  The performance\nimpact is negligible.\n\nThis option can be useful to produce MO files that are optimized\nfor one platform.\n\n'--no-hash'\nDon't include a hash table in the binary file.  Lookup will be more\nexpensive at run time (binary search instead of hash table lookup).\n\n\n'-h'\n'--help'\nDisplay this help and exit.\n\n'-V'\n'--version'\nOutput version information and exit.\n\n'--statistics'\nPrint statistics about translations.  When the option '--verbose'\nis used in combination with '--statistics', the input file name is\nprinted in front of the statistics line.\n\n'-v'\n'--verbose'\nIncrease verbosity level.\n"
                    }
                ]
            }
        }
    }
}