{
    "content": [
        {
            "type": "text",
            "text": "# locale (man)\n\n## NAME\n\nlocale - get locale-specific information\n\n## SYNOPSIS\n\nlocale [option]\nlocale [option] -a\nlocale [option] -m\nlocale [option] name...\n\n## DESCRIPTION\n\nThe locale command displays information about the current locale, or all locales, on standard\noutput.\n\n## TLDR\n\n> Get locale-specific information.\n\n- List all global environment variables describing the user's locale:\n  `locale`\n- List all available locales:\n  `locale {{-a|--all-locales}}`\n- Display all available locales and the associated metadata:\n  `locale {{-a|--all-locales}} {{-v|--verbose}}`\n- Display the current date format:\n  `locale date_fmt`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (14 subsections)\n- **FILES**\n- **STANDARDS**\n- **HISTORY**\n- **EXAMPLES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "locale",
        "section": "",
        "mode": "man",
        "summary": "locale - get locale-specific information",
        "synopsis": "locale [option]\nlocale [option] -a\nlocale [option] -m\nlocale [option] name...",
        "tldr_summary": "Get locale-specific information.",
        "tldr_examples": [
            {
                "description": "List all global environment variables describing the user's locale",
                "command": "locale"
            },
            {
                "description": "List all available locales",
                "command": "locale {{-a|--all-locales}}"
            },
            {
                "description": "Display all available locales and the associated metadata",
                "command": "locale {{-a|--all-locales}} {{-v|--verbose}}"
            },
            {
                "description": "Display the current date format",
                "command": "locale date_fmt"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": "--all-locales",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "metadata about each locale to be included in the output."
            },
            {
                "flag": "",
                "long": "--charmaps",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-m",
                "long": null,
                "arg": null,
                "description": "rent character set for the locale, use locale -c charmap. The locale command can also be provided with one or more arguments, which are the names of locale keywords (for example, datefmt, ctype-class-names, yesexpr, or decimalpoint) or lo‐ cale categories (for example, LCCTYPE or LCTIME). For each argument, the following is dis‐ played: • For a locale keyword, the value of that keyword to be displayed. • For a locale category, the values of all keywords in that category are displayed. When arguments are supplied, the following options are meaningful:"
            },
            {
                "flag": "",
                "long": "--category-name",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "preceding the list of keyword values for that category. For a keyword name argument, write the name of the locale category for this keyword on a separate line preceding the keyword value. This option improves readability when multiple name arguments are specified. It can be combined with the -k option."
            },
            {
                "flag": "",
                "long": "--keyword-name",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-k",
                "long": null,
                "arg": null,
                "description": "word, so that the output has the format: keyword=\"value\" The locale command also knows about the following options:"
            },
            {
                "flag": "",
                "long": "--verbose",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": "--help",
                "arg": null,
                "description": "-? Display a summary of command-line options and arguments and exit."
            },
            {
                "flag": "",
                "long": "--usage",
                "arg": null,
                "description": "Display a short usage message and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": ""
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": ""
            }
        ],
        "examples": [
            "$ locale",
            "LANG=enUS.UTF-8",
            "LCCTYPE=\"enUS.UTF-8\"",
            "LCNUMERIC=\"enUS.UTF-8\"",
            "LCTIME=\"enUS.UTF-8\"",
            "LCCOLLATE=\"enUS.UTF-8\"",
            "LCMONETARY=\"enUS.UTF-8\"",
            "LCMESSAGES=\"enUS.UTF-8\"",
            "LCPAPER=\"enUS.UTF-8\"",
            "LCNAME=\"enUS.UTF-8\"",
            "LCADDRESS=\"enUS.UTF-8\"",
            "LCTELEPHONE=\"enUS.UTF-8\"",
            "LCMEASUREMENT=\"enUS.UTF-8\"",
            "LCIDENTIFICATION=\"enUS.UTF-8\"",
            "LCALL=",
            "$ locale datefmt",
            "%a %b %e %H:%M:%S %Z %Y",
            "$ locale -k datefmt",
            "datefmt=\"%a %b %e %H:%M:%S %Z %Y\"",
            "$ locale -ck datefmt",
            "LCTIME",
            "datefmt=\"%a %b %e %H:%M:%S %Z %Y\"",
            "$ locale LCTELEPHONE",
            "+%c (%a) %l",
            "(%a) %l",
            "11",
            "UTF-8",
            "$ locale -k LCTELEPHONE",
            "telintfmt=\"+%c (%a) %l\"",
            "teldomfmt=\"(%a) %l\"",
            "intselect=\"11\"",
            "intprefix=\"1\"",
            "telephone-codeset=\"UTF-8\"",
            "The following example compiles a custom locale from the ./wrk directory with the localedef(1)",
            "utility  under  the  $HOME/.locale directory, then tests the result with the date(1) command,",
            "and then sets the environment variables LOCPATH and LANG in the shell profile  file  so  that",
            "the custom locale will be used in the subsequent user sessions:",
            "$ mkdir -p $HOME/.locale",
            "$ I18NPATH=./wrk/ localedef -f UTF-8 -i fiSE $HOME/.locale/fiSE.UTF-8",
            "$ LOCPATH=$HOME/.locale LCALL=fiSE.UTF-8 date",
            "$ echo \"export LOCPATH=\\$HOME/.locale\" >> $HOME/.bashrc",
            "$ echo \"export LANG=fiSE.UTF-8\" >> $HOME/.bashrc"
        ],
        "see_also": [
            {
                "name": "localedef",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/localedef/1/json"
            },
            {
                "name": "charmap",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/charmap/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": [
                    {
                        "name": "--all-locales",
                        "lines": 1,
                        "long": "--all-locales"
                    },
                    {
                        "name": "-a      -v",
                        "lines": 2,
                        "flag": "-v"
                    },
                    {
                        "name": "--charmaps",
                        "lines": 1,
                        "long": "--charmaps"
                    },
                    {
                        "name": "-m",
                        "lines": 13,
                        "flag": "-m"
                    },
                    {
                        "name": "--category-name",
                        "lines": 1,
                        "long": "--category-name"
                    },
                    {
                        "name": "-c",
                        "lines": 8,
                        "flag": "-c"
                    },
                    {
                        "name": "--keyword-name",
                        "lines": 1,
                        "long": "--keyword-name"
                    },
                    {
                        "name": "-k",
                        "lines": 6,
                        "flag": "-k"
                    },
                    {
                        "name": "--verbose",
                        "lines": 1,
                        "long": "--verbose"
                    },
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    },
                    {
                        "name": "--help",
                        "lines": 2,
                        "long": "--help"
                    },
                    {
                        "name": "--usage",
                        "lines": 2,
                        "long": "--usage"
                    },
                    {
                        "name": "--version",
                        "lines": 1,
                        "long": "--version"
                    },
                    {
                        "name": "-V",
                        "lines": 1,
                        "flag": "-V"
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "STANDARDS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 51,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "locale - get locale-specific information\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "locale [option]\nlocale [option] -a\nlocale [option] -m\nlocale [option] name...\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The locale command displays information about the current locale, or all locales, on standard\noutput.\n\nWhen  invoked  without arguments, locale displays the current locale settings for each locale\ncategory (see locale(5)), based on the settings of the environment variables that control the\nlocale (see locale(7)).  Values for variables set in the environment are printed without dou‐\nble quotes, implied values are printed with double quotes.\n\nIf either the -a or the -m option (or one of their long-format equivalents) is specified, the\nbehavior is as follows:\n",
                "subsections": [
                    {
                        "name": "--all-locales",
                        "content": "",
                        "long": "--all-locales"
                    },
                    {
                        "name": "-a      -v",
                        "content": "metadata about each locale to be included in the output.\n",
                        "flag": "-v"
                    },
                    {
                        "name": "--charmaps",
                        "content": "",
                        "long": "--charmaps"
                    },
                    {
                        "name": "-m",
                        "content": "rent character set for the locale, use locale -c charmap.\n\nThe  locale  command  can also be provided with one or more arguments, which are the names of\nlocale keywords (for example, datefmt, ctype-class-names, yesexpr, or decimalpoint) or  lo‐\ncale categories (for example, LCCTYPE or LCTIME).  For each argument, the following is dis‐\nplayed:\n\n•  For a locale keyword, the value of that keyword to be displayed.\n\n•  For a locale category, the values of all keywords in that category are displayed.\n\nWhen arguments are supplied, the following options are meaningful:\n",
                        "flag": "-m"
                    },
                    {
                        "name": "--category-name",
                        "content": "",
                        "long": "--category-name"
                    },
                    {
                        "name": "-c",
                        "content": "preceding the list of keyword values for that category.\n\nFor a keyword name argument, write the name of the locale category for this keyword on\na separate line preceding the keyword value.\n\nThis  option  improves readability when multiple name arguments are specified.  It can\nbe combined with the -k option.\n",
                        "flag": "-c"
                    },
                    {
                        "name": "--keyword-name",
                        "content": "",
                        "long": "--keyword-name"
                    },
                    {
                        "name": "-k",
                        "content": "word, so that the output has the format:\n\nkeyword=\"value\"\n\nThe locale command also knows about the following options:\n",
                        "flag": "-k"
                    },
                    {
                        "name": "--verbose",
                        "content": "",
                        "long": "--verbose"
                    },
                    {
                        "name": "-v",
                        "content": "",
                        "flag": "-v"
                    },
                    {
                        "name": "--help",
                        "content": "-?     Display a summary of command-line options and arguments and exit.\n",
                        "long": "--help"
                    },
                    {
                        "name": "--usage",
                        "content": "Display a short usage message and exit.\n",
                        "long": "--usage"
                    },
                    {
                        "name": "--version",
                        "content": "",
                        "long": "--version"
                    },
                    {
                        "name": "-V",
                        "content": "",
                        "flag": "-V"
                    }
                ]
            },
            "FILES": {
                "content": "/usr/lib/locale/locale-archive\nUsual default locale archive location.\n\n/usr/share/i18n/locales\nUsual default path for locale definition files.\n",
                "subsections": []
            },
            "STANDARDS": {
                "content": "POSIX.1-2008.\n",
                "subsections": []
            },
            "HISTORY": {
                "content": "POSIX.1-2001.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "$ locale\nLANG=enUS.UTF-8\nLCCTYPE=\"enUS.UTF-8\"\nLCNUMERIC=\"enUS.UTF-8\"\nLCTIME=\"enUS.UTF-8\"\nLCCOLLATE=\"enUS.UTF-8\"\nLCMONETARY=\"enUS.UTF-8\"\nLCMESSAGES=\"enUS.UTF-8\"\nLCPAPER=\"enUS.UTF-8\"\nLCNAME=\"enUS.UTF-8\"\nLCADDRESS=\"enUS.UTF-8\"\nLCTELEPHONE=\"enUS.UTF-8\"\nLCMEASUREMENT=\"enUS.UTF-8\"\nLCIDENTIFICATION=\"enUS.UTF-8\"\nLCALL=\n\n$ locale datefmt\n%a %b %e %H:%M:%S %Z %Y\n\n$ locale -k datefmt\ndatefmt=\"%a %b %e %H:%M:%S %Z %Y\"\n\n$ locale -ck datefmt\nLCTIME\ndatefmt=\"%a %b %e %H:%M:%S %Z %Y\"\n\n$ locale LCTELEPHONE\n+%c (%a) %l\n(%a) %l\n11\n1\nUTF-8\n\n$ locale -k LCTELEPHONE\ntelintfmt=\"+%c (%a) %l\"\nteldomfmt=\"(%a) %l\"\nintselect=\"11\"\nintprefix=\"1\"\ntelephone-codeset=\"UTF-8\"\n\nThe following example compiles a custom locale from the ./wrk directory with the localedef(1)\nutility  under  the  $HOME/.locale directory, then tests the result with the date(1) command,\nand then sets the environment variables LOCPATH and LANG in the shell profile  file  so  that\nthe custom locale will be used in the subsequent user sessions:\n\n$ mkdir -p $HOME/.locale\n$ I18NPATH=./wrk/ localedef -f UTF-8 -i fiSE $HOME/.locale/fiSE.UTF-8\n$ LOCPATH=$HOME/.locale LCALL=fiSE.UTF-8 date\n$ echo \"export LOCPATH=\\$HOME/.locale\" >> $HOME/.bashrc\n$ echo \"export LANG=fiSE.UTF-8\" >> $HOME/.bashrc\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "localedef(1), charmap(5), locale(5), locale(7)\n\nLinux man-pages 6.7                          2023-10-31                                    locale(1)",
                "subsections": []
            }
        }
    }
}