{
    "content": [
        {
            "type": "text",
            "text": "# gettext (man)\n\n## NAME\n\ngettext - translate message\n\n## SYNOPSIS\n\ngettext [OPTION] [[TEXTDOMAIN] MSGID]\ngettext [OPTION] -s [MSGID]...\n\n## DESCRIPTION\n\nThe  gettext program translates a natural language message into the user's language, by look‐\ning up the translation in a message catalog.\n\n## TLDR\n\n> Translates a string using stored translations in a compiled `.mo` file.\n\n- Get the translation of a string as specified in the domain file (falls back to given `msgid` if no translation exists):\n  `LANGUAGE={{locale}} gettext {{-d|--domain}} {{domain}} \"{{msgid}}\"`\n- Display help:\n  `gettext {{-h|--help}}`\n- Display version:\n  `gettext {{-V|--version}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (8 subsections)\n- **AUTHOR**\n- **REPORTING BUGS**\n- **COPYRIGHT**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "gettext",
        "section": "",
        "mode": "man",
        "summary": "gettext - translate message",
        "synopsis": "gettext [OPTION] [[TEXTDOMAIN] MSGID]\ngettext [OPTION] -s [MSGID]...",
        "tldr_summary": "Translates a string using stored translations in a compiled `.mo` file.",
        "tldr_examples": [
            {
                "description": "Get the translation of a string as specified in the domain file (falls back to given `msgid` if no translation exists)",
                "command": "LANGUAGE={{locale}} gettext {{-d|--domain}} {{domain}} \"{{msgid}}\""
            },
            {
                "description": "Display help",
                "command": "gettext {{-h|--help}}"
            },
            {
                "description": "Display version",
                "command": "gettext {{-V|--version}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-d",
                "long": "--domain",
                "arg": null,
                "description": "retrieve translated messages from TEXTDOMAIN"
            },
            {
                "flag": "-c",
                "long": "--context",
                "arg": null,
                "description": "specify context for MSGID"
            },
            {
                "flag": "-e",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-E",
                "long": null,
                "arg": null,
                "description": "[TEXTDOMAIN] MSGID retrieve translated message corresponding to MSGID from TEXTDOMAIN"
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "display this help and exit"
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "display version information and exit If the TEXTDOMAIN parameter is not given, the domain is determined from the environment vari‐ able TEXTDOMAIN. If the message catalog is not found in the regular directory, another loca‐ tion can be specified with the environment variable TEXTDOMAINDIR. When used with the -s op‐ tion the program behaves like the 'echo' command. But it does not simply copy its arguments to stdout. Instead those messages found in the selected catalog are translated. Standard search directory: /usr/share/locale"
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": [
                    {
                        "name": "-d --domain",
                        "lines": 2,
                        "flag": "-d",
                        "long": "--domain"
                    },
                    {
                        "name": "-c --context",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--context"
                    },
                    {
                        "name": "-e",
                        "lines": 1,
                        "flag": "-e"
                    },
                    {
                        "name": "-n",
                        "lines": 1,
                        "flag": "-n"
                    },
                    {
                        "name": "-E",
                        "lines": 3,
                        "flag": "-E"
                    },
                    {
                        "name": "Informative output:",
                        "lines": 1
                    },
                    {
                        "name": "-h --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "lines": 9,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "REPORTING BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "gettext - translate message\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "gettext [OPTION] [[TEXTDOMAIN] MSGID]\ngettext [OPTION] -s [MSGID]...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The  gettext program translates a natural language message into the user's language, by look‐\ning up the translation in a message catalog.\n\nDisplay native language translation of a textual message.\n",
                "subsections": [
                    {
                        "name": "-d --domain",
                        "content": "retrieve translated messages from TEXTDOMAIN\n",
                        "flag": "-d",
                        "long": "--domain"
                    },
                    {
                        "name": "-c --context",
                        "content": "specify context for MSGID\n",
                        "flag": "-c",
                        "long": "--context"
                    },
                    {
                        "name": "-e",
                        "content": "",
                        "flag": "-e"
                    },
                    {
                        "name": "-n",
                        "content": "",
                        "flag": "-n"
                    },
                    {
                        "name": "-E",
                        "content": "[TEXTDOMAIN] MSGID\nretrieve translated message corresponding to MSGID from TEXTDOMAIN\n",
                        "flag": "-E"
                    },
                    {
                        "name": "Informative output:",
                        "content": ""
                    },
                    {
                        "name": "-h --help",
                        "content": "display this help and exit\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-V --version",
                        "content": "display version information and exit\n\nIf the TEXTDOMAIN parameter is not given, the domain is determined from the environment vari‐\nable TEXTDOMAIN.  If the message catalog is not found in the regular directory, another loca‐\ntion can be specified with the environment variable TEXTDOMAINDIR.  When used with the -s op‐\ntion the program behaves like the 'echo' command.  But it does not simply copy its  arguments\nto  stdout.   Instead  those messages found in the selected catalog are translated.  Standard\nsearch directory: /usr/share/locale\n",
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Written by Ulrich Drepper.\n",
                "subsections": []
            },
            "REPORTING BUGS": {
                "content": "Report bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email  to\n<bug-gettext@gnu.org>.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright  ©  1995-2020  Free Software Foundation, Inc.  License GPLv3+: GNU GPL version 3 or\nlater <https://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.  There is NO WARRANTY,  to\nthe extent permitted by law.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "The  full  documentation for gettext is maintained as a Texinfo manual.  If the info and get‐\ntext programs are properly installed at your site, the command\n\ninfo gettext\n\nshould give you access to the complete manual.\n\nGNU gettext-runtime 0.21                     April 2024                                   GETTEXT(1)",
                "subsections": []
            }
        }
    }
}