{
    "content": [
        {
            "type": "text",
            "text": "# gettext(1) (man)\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---\n\n**Summary:** gettext - translate message\n\n**Synopsis:** gettext [OPTION] [[TEXTDOMAIN] MSGID]\ngettext [OPTION] -s [MSGID]...\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -d | --domain | — | retrieve translated messages from TEXTDOMAIN |\n| -c | --context | — | specify context for MSGID |\n| -e | — | — |  |\n| -n | — | — |  |\n| -E | — | — | [TEXTDOMAIN] MSGID retrieve translated message corresponding to MSGID from TEXTDOMAIN |\n| -h | --help | — | display this help and exit |\n| -V | --version | — | display version information and exit If the TEXTDOMAIN parameter is not given, the domain is determined from the environ |\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (5 lines) — 8 subsections\n  - -d --domain (2 lines)\n  - -c --context (2 lines)\n  - -e (1 lines)\n  - -n (1 lines)\n  - -E (3 lines)\n  - Informative output: (1 lines)\n  - -h --help (2 lines)\n  - -V --version (9 lines)\n- **AUTHOR** (2 lines)\n- **REPORTING BUGS** (3 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (10 lines)\n\n## Full Content\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\nDisplay native language translation of a textual message.\n\n#### -d --domain\n\nretrieve translated messages from TEXTDOMAIN\n\n#### -c --context\n\nspecify context for MSGID\n\n#### -e\n\n#### -n\n\n#### -E\n\n[TEXTDOMAIN] MSGID\nretrieve translated message corresponding to MSGID from TEXTDOMAIN\n\n#### Informative output:\n\n#### -h --help\n\ndisplay this help and exit\n\n#### -V --version\n\ndisplay 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\n### AUTHOR\n\nWritten by Ulrich Drepper.\n\n### REPORTING BUGS\n\nReport  bugs in the bug tracker at <https://savannah.gnu.org/projects/gettext> or by email to\n<bug-gettext@gnu.org>.\n\n### COPYRIGHT\n\nCopyright © 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\n### SEE ALSO\n\nThe 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\n\n\nGNU gettext-runtime 0.21                     March 2022                                   GETTEXT(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "gettext",
        "section": "1",
        "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": 10,
                "subsections": []
            }
        ]
    }
}