{
    "content": [
        {
            "type": "text",
            "text": "# gettext (pydoc)\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 - Internationalization and localization support.\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **MODULE REFERENCE** (8 lines)\n- **DESCRIPTION** (8 lines)\n- **CLASSES** (4 lines) — 2 subsections\n  - class GNUTranslations (59 lines)\n  - class NullTranslations (40 lines)\n- **FUNCTIONS** (2 lines) — 18 subsections\n  - bind_textdomain_codeset (1 lines)\n  - bindtextdomain (1 lines)\n  - dgettext (1 lines)\n  - dngettext (1 lines)\n  - dnpgettext (1 lines)\n  - dpgettext (1 lines)\n  - find (2 lines)\n  - gettext (1 lines)\n  - install (1 lines)\n  - ldgettext (1 lines)\n  - ldngettext (1 lines)\n  - lgettext (1 lines)\n  - lngettext (1 lines)\n  - ngettext (1 lines)\n  - npgettext (1 lines)\n  - pgettext (1 lines)\n  - textdomain (1 lines)\n  - translation (1 lines)\n- **DATA** (2 lines)\n- **FILE** (3 lines)\n\n## Full Content\n\n### NAME\n\ngettext - Internationalization and localization support.\n\n### MODULE REFERENCE\n\nhttps://docs.python.org/3.10/library/gettext.html\n\nThe following documentation is automatically generated from the Python\nsource files.  It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations.  When in doubt, consult the module reference at the\nlocation listed above.\n\n### DESCRIPTION\n\nThis module provides internationalization (I18N) and localization (L10N)\nsupport for your Python programs by providing an interface to the GNU gettext\nmessage catalog library.\n\nI18N refers to the operation by which a program is made aware of multiple\nlanguages.  L10N refers to the adaptation of your program, once\ninternationalized, to the local language and cultural habits.\n\n### CLASSES\n\nbuiltins.object\nNullTranslations\nGNUTranslations\n\n#### class GNUTranslations\n\n|  GNUTranslations(fp=None)\n|\n|  Method resolution order:\n|      GNUTranslations\n|      NullTranslations\n|      builtins.object\n|\n|  Methods defined here:\n|\n|  gettext(self, message)\n|\n|  lgettext(self, message)\n|\n|  lngettext(self, msgid1, msgid2, n)\n|\n|  ngettext(self, msgid1, msgid2, n)\n|\n|  npgettext(self, context, msgid1, msgid2, n)\n|\n|  pgettext(self, context, message)\n|\n|  ----------------------------------------------------------------------\n|  Data and other attributes defined here:\n|\n|  BEMAGIC = 3725722773\n|\n|  CONTEXT = '%s\\x04%s'\n|\n|  LEMAGIC = 2500072158\n|\n|  VERSIONS = (0, 1)\n|\n|  ----------------------------------------------------------------------\n|  Methods inherited from NullTranslations:\n|\n|  init(self, fp=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  addfallback(self, fallback)\n|\n|  charset(self)\n|\n|  info(self)\n|\n|  install(self, names=None)\n|\n|  outputcharset(self)\n|\n|  setoutputcharset(self, charset)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors inherited from NullTranslations:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n#### class NullTranslations\n\n|  NullTranslations(fp=None)\n|\n|  Methods defined here:\n|\n|  init(self, fp=None)\n|      Initialize self.  See help(type(self)) for accurate signature.\n|\n|  addfallback(self, fallback)\n|\n|  charset(self)\n|\n|  gettext(self, message)\n|\n|  info(self)\n|\n|  install(self, names=None)\n|\n|  lgettext(self, message)\n|\n|  lngettext(self, msgid1, msgid2, n)\n|\n|  ngettext(self, msgid1, msgid2, n)\n|\n|  npgettext(self, context, msgid1, msgid2, n)\n|\n|  outputcharset(self)\n|\n|  pgettext(self, context, message)\n|\n|  setoutputcharset(self, charset)\n|\n|  ----------------------------------------------------------------------\n|  Data descriptors defined here:\n|\n|  dict\n|      dictionary for instance variables (if defined)\n|\n|  weakref\n|      list of weak references to the object (if defined)\n\n### FUNCTIONS\n\nCatalog = translation(domain, localedir=None, languages=None, class=None, fallback=False, codeset=['unspecified'])\n\n#### bind_textdomain_codeset\n\n#### bindtextdomain\n\n#### dgettext\n\n#### dngettext\n\n#### dnpgettext\n\n#### dpgettext\n\n#### find\n\n# Locate a .mo file using the gettext strategy\n\n#### gettext\n\n#### install\n\n#### ldgettext\n\n#### ldngettext\n\n#### lgettext\n\n#### lngettext\n\n#### ngettext\n\n#### npgettext\n\n#### pgettext\n\n#### textdomain\n\n#### translation\n\n### DATA\n\nall = ['NullTranslations', 'GNUTranslations', 'Catalog', 'find', '...\n\n### FILE\n\n/usr/lib/python3.10/gettext.py\n\n"
        }
    ],
    "structuredContent": {
        "command": "gettext",
        "section": "",
        "mode": "pydoc",
        "summary": "gettext - Internationalization and localization support.",
        "synopsis": null,
        "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": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "MODULE REFERENCE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "CLASSES",
                "lines": 4,
                "subsections": [
                    {
                        "name": "class GNUTranslations",
                        "lines": 59
                    },
                    {
                        "name": "class NullTranslations",
                        "lines": 40
                    }
                ]
            },
            {
                "name": "FUNCTIONS",
                "lines": 2,
                "subsections": [
                    {
                        "name": "bind_textdomain_codeset",
                        "lines": 1
                    },
                    {
                        "name": "bindtextdomain",
                        "lines": 1
                    },
                    {
                        "name": "dgettext",
                        "lines": 1
                    },
                    {
                        "name": "dngettext",
                        "lines": 1
                    },
                    {
                        "name": "dnpgettext",
                        "lines": 1
                    },
                    {
                        "name": "dpgettext",
                        "lines": 1
                    },
                    {
                        "name": "find",
                        "lines": 2
                    },
                    {
                        "name": "gettext",
                        "lines": 1
                    },
                    {
                        "name": "install",
                        "lines": 1
                    },
                    {
                        "name": "ldgettext",
                        "lines": 1
                    },
                    {
                        "name": "ldngettext",
                        "lines": 1
                    },
                    {
                        "name": "lgettext",
                        "lines": 1
                    },
                    {
                        "name": "lngettext",
                        "lines": 1
                    },
                    {
                        "name": "ngettext",
                        "lines": 1
                    },
                    {
                        "name": "npgettext",
                        "lines": 1
                    },
                    {
                        "name": "pgettext",
                        "lines": 1
                    },
                    {
                        "name": "textdomain",
                        "lines": 1
                    },
                    {
                        "name": "translation",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DATA",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "FILE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}