{
    "mode": "man",
    "parameter": "validlocale",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/validlocale/8/json",
    "generated": "2026-05-30T07:08:21Z",
    "sections": {
        "NAME": {
            "content": "validlocale - Test if a given locale is available\n",
            "subsections": []
        },
        "SYNTAX": {
            "content": "validlocale <locale>\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Test  if  the  locale  given as argument is a valid locale.  If it isn't, print on stdout the\nstring to add to /etc/locale.gen to make locale-gen generate the  locale  (if  it  exists  at\nall).\n",
            "subsections": []
        },
        "FILES": {
            "content": "/usr/sbin/validlocale\n/usr/share/i18n/SUPPORTED\n",
            "subsections": []
        },
        "ENVIRONMENT VARIABLES": {
            "content": "DEFAULTCHARSET\nWhich  charset to assume if the given locale is missing from the list of supported lo‐\ncales.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "If you give a valid locale as parameter, it outputs a string specifying this on stderr:\n\n% validlocale C\nlocale 'C' valid and available\n\nWhen given a invalid (not generated or just nonexistent),  it  outputs  a  string  on  stderr\ntelling  that  this  is  an  invalid locale, and a string to stdout with the string to add to\n/etc/locale.gen to have this locale generated:\n\n% validlocale deAU@euro\nlocale 'deAU@euro' not available\ndeAU@euro ISO-8859-15\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Petter Reinholdtsen <pere@hungry.com>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "locale-gen(8), localedef(1), locale(1)\n\n\n\nPetter Reinholdtsen                              0.1                                  validlocale(8)",
            "subsections": []
        }
    },
    "summary": "validlocale - Test if a given locale is available",
    "flags": [],
    "examples": [
        "If you give a valid locale as parameter, it outputs a string specifying this on stderr:",
        "% validlocale C",
        "locale 'C' valid and available",
        "When given a invalid (not generated or just nonexistent),  it  outputs  a  string  on  stderr",
        "telling  that  this  is  an  invalid locale, and a string to stdout with the string to add to",
        "/etc/locale.gen to have this locale generated:",
        "% validlocale deAU@euro",
        "locale 'deAU@euro' not available",
        "deAU@euro ISO-8859-15"
    ],
    "see_also": [
        {
            "name": "locale-gen",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/locale-gen/8/json"
        },
        {
            "name": "localedef",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/localedef/1/json"
        },
        {
            "name": "locale",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/locale/1/json"
        }
    ]
}