{
    "content": [
        {
            "type": "text",
            "text": "# bindtextdomain (man)\n\n## NAME\n\nbindtextdomain - set directory containing message catalogs\n\n## DESCRIPTION\n\nThe bindtextdomain function sets the base directory of the hierarchy containing message cata‐\nlogs for a given message domain.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS** (1 subsections)\n- **DESCRIPTION**\n- **RETURN VALUE**\n- **ERRORS**\n- **BUGS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "bindtextdomain",
        "section": "",
        "mode": "man",
        "summary": "bindtextdomain - set directory containing message catalogs",
        "synopsis": "",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "gettext",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/gettext/3/json"
            },
            {
                "name": "dgettext",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/dgettext/3/json"
            },
            {
                "name": "dcgettext",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/dcgettext/3/json"
            },
            {
                "name": "ngettext",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/ngettext/3/json"
            },
            {
                "name": "dngettext",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/dngettext/3/json"
            },
            {
                "name": "dcngettext",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/dcngettext/3/json"
            },
            {
                "name": "main",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/main/3/json"
            },
            {
                "name": "realpath",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/realpath/3/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "#include <libintl.h>",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "RETURN VALUE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "ERRORS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "bindtextdomain - set directory containing message catalogs\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "",
                "subsections": [
                    {
                        "name": "#include <libintl.h>",
                        "content": "char * bindtextdomain (const char * domainname, const char * dirname);\n"
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "The bindtextdomain function sets the base directory of the hierarchy containing message cata‐\nlogs for a given message domain.\n\nA message domain is a set of translatable msgid messages. Usually, every software package has\nits  own  message domain. The need for calling bindtextdomain arises because packages are not\nalways installed with the same prefix as the <libintl.h>  header  and  the  libc/libintl  li‐\nbraries.\n\nMessage  catalogs  will  be  expected at the pathnames dirname/locale/category/domainname.mo,\nwhere locale is a locale name and category is a locale facet such as LCMESSAGES.\n\ndomainname must be a non-empty string.\n\nIf dirname is not NULL, the base directory for message catalogs belonging to  domain  domain‐\nname  is  set to dirname. The function makes copies of the argument strings as needed. If the\nprogram wishes to call the chdir function, it is important that dirname be an absolute  path‐\nname; otherwise it cannot be guaranteed that the message catalogs will be found.\n\nIf dirname is NULL, the function returns the previously set base directory for domain domain‐\nname.\n",
                "subsections": []
            },
            "RETURN VALUE": {
                "content": "If successful, the bindtextdomain function returns the current base directory for domain  do‐\nmainname,  after  possibly  changing  it.  The resulting string is valid until the next bind‐‐\ntextdomain call for the same domainname and must not be modified or freed. If a memory  allo‐\ncation failure occurs, it sets errno to ENOMEM and returns NULL.\n",
                "subsections": []
            },
            "ERRORS": {
                "content": "The following error can occur, among others:\n\nENOMEM Not enough memory available.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "The return type ought to be const char *, but is char * to avoid warnings in C code predating\nANSI C.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "gettext(3), dgettext(3),  dcgettext(3),  ngettext(3),  dngettext(3),  dcngettext(3),  textdo‐‐\nmain(3), realpath(3)\n\n\n\nGNU gettext 0.20.1.124-32cf                   May 2001                             BINDTEXTDOMAIN(3)",
                "subsections": []
            }
        }
    }
}