{
    "content": [
        {
            "type": "text",
            "text": "# localedef(1) (man)\n\n## TLDR\n\n> Manage locale definition files.\n\n- List compiled locales:\n  `localedef --list-archive`\n- Display help:\n  `localedef {{-?|--help}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** localedef - compile locale definition files\n\n**Synopsis:** localedef [options] outputpath\nlocaledef --add-to-archive [options] compiledpath\nlocaledef --delete-from-archive [options] localename ...\nlocaledef --list-archive [options]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --add-to-archive | — | Add the compiledpath directories to the locale archive file. The directories should have been created by previous runs o |\n| — | --delete-from-archive | — | Delete the named locales from the locale archive file. |\n| — | --list-archive | — | List the locales contained in the locale archive file. |\n| -f | — | — | Specify the file that defines the character set that is used by the input file. If charmapfile contains a slash characte |\n| -i | — | — | Specify the locale definition file to compile. The file is sought in the current di‐ rectory and the default directory f |\n| -u | — | — | Read mappings from symbolic names to Unicode code points from repertoirefile. If repertoirefile contains a slash charact |\n| -A | — | — | Use aliasfile to look up aliases for locale names. There is no default aliases file. |\n| -c | --force | — | Write the output files even if warnings were generated about the input file. |\n| -v | --verbose | — | Generate extra warnings about errors that are normally ignored. |\n| — | --big-endian | — | Generate big-endian output. |\n| — | --little-endian | — | Generate little-endian output. |\n| — | --no-archive | — | Do not use the locale archive file, instead create outputpath as a subdirectory in the same directory as the locale arch |\n| — | --no-hard-links | — | Do not create hard links between installed locales. --no-warnings=warnings Comma-separated list of warnings to disable.  |\n| — | --posix | — | Conform strictly to POSIX. Implies --verbose. This option currently has no other ef‐ fect. POSIX conformance is assumed  |\n| — | --quiet | — | Suppress all notifications and warnings, and report only fatal errors. |\n| — | --replace | — | Replace a locale in the locale archive file. Without this option, if the locale is in the archive file already, an error |\n| — | --usage | — | Print a short usage summary and exit. |\n| -V | --version | — | Print the version number, license, and disclaimer of warranty for localedef. |\n\n## Examples\n\n- `Compile the locale files for Finnish in the UTF-8 character set and add it to the default lo‐`\n- `cale archive with the name fiFI.UTF-8:`\n- `localedef -f UTF-8 -i fiFI fiFI.UTF-8`\n- `The next example does the same thing, but generates  files  into  the  fiFI.UTF-8  directory`\n- `which  can  then be used by programs when the environment variable LOCPATH is set to the cur‐`\n- `rent directory (note that the last argument must contain a slash):`\n- `localedef -f UTF-8 -i fiFI ./fiFI.UTF-8`\n\n## See Also\n\n- locale(1)\n- charmap(5)\n- locale(5)\n- repertoiremap(5)\n- locale(7)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines) — 3 subsections\n  - localedef --help (1 lines)\n  - localedef --usage (1 lines)\n  - localedef --version (1 lines)\n- **DESCRIPTION** (24 lines)\n- **OPTIONS** (1 lines) — 20 subsections\n  - Operation-selection options (3 lines)\n  - --add-to-archive (3 lines)\n  - --delete-from-archive (2 lines)\n  - --list-archive (2 lines)\n  - Other options (4 lines)\n  - -f --charmap= (7 lines)\n  - -i --inputfile= (6 lines)\n  - -u --repertoire-map= (7 lines)\n  - -A --alias-file= (2 lines)\n  - -c --force (2 lines)\n  - -v --verbose (2 lines)\n  - --big-endian (2 lines)\n  - --little-endian (2 lines)\n  - --no-archive (5 lines)\n  - --no-hard-links (6 lines)\n  - --posix (9 lines)\n  - --quiet (2 lines)\n  - --replace (10 lines)\n  - --usage (2 lines)\n  - -V --version (2 lines)\n- **EXIT STATUS** (8 lines)\n- **ENVIRONMENT** (6 lines)\n- **FILES** (57 lines)\n- **CONFORMING TO** (2 lines)\n- **EXAMPLES** (11 lines)\n- **SEE ALSO** (2 lines)\n- **COLOPHON** (7 lines)\n\n## Full Content\n\n### NAME\n\nlocaledef - compile locale definition files\n\n### SYNOPSIS\n\nlocaledef [options] outputpath\nlocaledef --add-to-archive [options] compiledpath\nlocaledef --delete-from-archive [options] localename ...\nlocaledef --list-archive [options]\n\n#### localedef --help\n\n#### localedef --usage\n\n#### localedef --version\n\n### DESCRIPTION\n\nThe  localedef program reads the indicated charmap and input files, compiles them to a binary\nform quickly usable by the locale functions in the C  library  (setlocale(3),  localeconv(3),\netc.), and places the output in outputpath.\n\nThe outputpath argument is interpreted as follows:\n\n*  If  outputpath  contains a slash character ('/'), it is interpreted as the name of the di‐\nrectory where the output definitions are to be stored.  In this case, there is a  separate\noutput file for each locale category (LCTIME, LCNUMERIC, and so on).\n\n*  If  the  --no-archive  option  is  used,  outputpath  is  the  name  of  a subdirectory in\n/usr/lib/locale where per-category compiled files are placed.\n\n*  Otherwise, outputpath is the name of a locale and the compiled locale data is added to the\narchive  file  /usr/lib/locale/locale-archive.   A  locale archive is a memory-mapped file\nwhich contains all the system-provided locales; it is used by all localized programs  when\nthe environment variable LOCPATH is not set.\n\nIn  any  case,  localedef aborts if the directory in which it tries to write locale files has\nnot already been created.\n\nIf no charmapfile is given, the value ANSIX3.4-1968 (for ASCII) is used by default.   If  no\ninputfile is given, or if it is given as a dash (-), localedef reads from standard input.\n\n### OPTIONS\n\n#### Operation-selection options\n\nA  few  options direct localedef to do something other than compile locale definitions.  Only\none of these options should be used at a time.\n\n#### --add-to-archive\n\nAdd the compiledpath directories to the locale archive file.  The  directories  should\nhave been created by previous runs of localedef, using --no-archive.\n\n#### --delete-from-archive\n\nDelete the named locales from the locale archive file.\n\n#### --list-archive\n\nList the locales contained in the locale archive file.\n\n#### Other options\n\nSome  of the following options are sensible only for certain operations; generally, it should\nbe self-evident which ones.  Notice that -f and -c are reversed from what you  might  expect;\nthat is, -f is not the same as --force.\n\n#### -f --charmap=\n\nSpecify  the  file  that defines the character set that is used by the input file.  If\ncharmapfile contains a slash character ('/'), it is interpreted as  the  name  of  the\ncharacter map.  Otherwise, the file is sought in the current directory and the default\ndirectory  for  character  maps.   If  the  environment  variable  I18NPATH  is   set,\n$I18NPATH/charmaps/ and $I18NPATH/ are also searched after the current directory.  The\ndefault directory for character maps is printed by localedef --help.\n\n#### -i --inputfile=\n\nSpecify the locale definition file to compile.  The file is sought in the current  di‐\nrectory  and  the  default  directory for locale definition files.  If the environment\nvariable I18NPATH is set, $I18NPATH/locales/ and $I18NPATH are also searched after the\ncurrent  directory.   The  default directory for locale definition files is printed by\nlocaledef --help.\n\n#### -u --repertoire-map=\n\nRead mappings from symbolic names to Unicode  code  points  from  repertoirefile.   If\nrepertoirefile  contains a slash character ('/'), it is interpreted as the pathname of\nthe repertoire map.  Otherwise, the file is sought in the current  directory  and  the\ndefault  directory  for repertoire maps.  If the environment variable I18NPATH is set,\n$I18NPATH/repertoiremaps/ and $I18NPATH are also searched after the current directory.\nThe default directory for repertoire maps is printed by localedef --help.\n\n#### -A --alias-file=\n\nUse aliasfile to look up aliases for locale names.  There is no default aliases file.\n\n#### -c --force\n\nWrite the output files even if warnings were generated about the input file.\n\n#### -v --verbose\n\nGenerate extra warnings about errors that are normally ignored.\n\n#### --big-endian\n\nGenerate big-endian output.\n\n#### --little-endian\n\nGenerate little-endian output.\n\n#### --no-archive\n\nDo not use the locale archive file, instead create outputpath as a subdirectory in the\nsame directory as the locale archive file, and create separate output files for locale\ncategories in it.  This is helpful to prevent system locale archive updates from over‐\nwriting custom locales created with localedef.\n\n#### --no-hard-links\n\nDo not create hard links between installed locales.\n\n--no-warnings=warnings\nComma-separated list of  warnings  to  disable.   Supported  warnings  are  ascii  and\nintcurrsym.\n\n#### --posix\n\nConform strictly to POSIX.  Implies --verbose.  This option currently has no other ef‐\nfect.  POSIX conformance is assumed if the  environment  variable  POSIXLYCORRECT  is\nset.\n\n--prefix=pathname\nSet  the  prefix to be prepended to the full archive pathname.  By default, the prefix\nis empty.  Setting the prefix to foo, the archive would be placed  in  foo/usr/lib/lo‐\ncale/locale-archive.\n\n#### --quiet\n\nSuppress all notifications and warnings, and report only fatal errors.\n\n#### --replace\n\nReplace a locale in the locale archive file.  Without this option, if the locale is in\nthe archive file already, an error occurs.\n\n--warnings=warnings\nComma-separated list  of  warnings  to  enable.   Supported  warnings  are  ascii  and\nintcurrsym.\n\n-?, --help\nPrint a usage summary and exit.  Also prints the default paths used by localedef.\n\n#### --usage\n\nPrint a short usage summary and exit.\n\n#### -V --version\n\nPrint the version number, license, and disclaimer of warranty for localedef.\n\n### EXIT STATUS\n\nOne of the following exit values can be returned by localedef:\n\n0      Command completed successfully.\n\n1      Warnings or errors occurred, output files were written.\n\n4      Errors encountered, no output created.\n\n### ENVIRONMENT\n\nPOSIXLYCORRECT\nThe --posix flag is assumed if this environment variable is set.\n\nI18NPATH\nA colon-separated list of search directories for files.\n\n### FILES\n\n/usr/share/i18n/charmaps\nUsual default character map path.\n\n/usr/share/i18n/locales\nUsual default path for locale definition files.\n\n/usr/share/i18n/repertoiremaps\nUsual default repertoire map path.\n\n/usr/lib/locale/locale-archive\nUsual default locale archive location.\n\n/usr/lib/locale\nUsual default path for compiled individual locale data files.\n\noutputpath/LCADDRESS\nAn  output file that contains information about formatting of addresses and geography-\nrelated items.\n\noutputpath/LCCOLLATE\nAn output file that contains information about the rules for comparing strings.\n\noutputpath/LCCTYPE\nAn output file that contains information about character classes.\n\noutputpath/LCIDENTIFICATION\nAn output file that contains metadata about the locale.\n\noutputpath/LCMEASUREMENT\nAn output file that contains information about locale measurements (metric  versus  US\ncustomary).\n\noutputpath/LCMESSAGES/SYSLCMESSAGES\nAn output file that contains information about the language messages should be printed\nin, and what an affirmative or negative answer looks like.\n\noutputpath/LCMONETARY\nAn output file that contains information about formatting of monetary values.\n\noutputpath/LCNAME\nAn output file that contains information about salutations for persons.\n\noutputpath/LCNUMERIC\nAn output file that contains information about formatting of nonmonetary numeric  val‐\nues.\n\noutputpath/LCPAPER\nAn  output  file  that  contains  information about settings related to standard paper\nsize.\n\noutputpath/LCTELEPHONE\nAn output file that contains information about formats to be used with telephone  ser‐\nvices.\n\noutputpath/LCTIME\nAn output file that contains information about formatting of data and time values.\n\n### CONFORMING TO\n\nPOSIX.1-2008.\n\n### EXAMPLES\n\nCompile the locale files for Finnish in the UTF-8 character set and add it to the default lo‐\ncale archive with the name fiFI.UTF-8:\n\nlocaledef -f UTF-8 -i fiFI fiFI.UTF-8\n\nThe next example does the same thing, but generates  files  into  the  fiFI.UTF-8  directory\nwhich  can  then be used by programs when the environment variable LOCPATH is set to the cur‐\nrent directory (note that the last argument must contain a slash):\n\nlocaledef -f UTF-8 -i fiFI ./fiFI.UTF-8\n\n### SEE ALSO\n\nlocale(1), charmap(5), locale(5), repertoiremap(5), locale(7)\n\n### COLOPHON\n\nThis page is part of release 5.10 of the Linux  man-pages  project.   A  description  of  the\nproject,  information about reporting bugs, and the latest version of this page, can be found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-04-11                                 LOCALEDEF(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "localedef",
        "section": "1",
        "mode": "man",
        "summary": "localedef - compile locale definition files",
        "synopsis": "localedef [options] outputpath\nlocaledef --add-to-archive [options] compiledpath\nlocaledef --delete-from-archive [options] localename ...\nlocaledef --list-archive [options]",
        "tldr_summary": "Manage locale definition files.",
        "tldr_examples": [
            {
                "description": "List compiled locales",
                "command": "localedef --list-archive"
            },
            {
                "description": "Display help",
                "command": "localedef {{-?|--help}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": "--add-to-archive",
                "arg": null,
                "description": "Add the compiledpath directories to the locale archive file. The directories should have been created by previous runs of localedef, using --no-archive."
            },
            {
                "flag": "",
                "long": "--delete-from-archive",
                "arg": null,
                "description": "Delete the named locales from the locale archive file."
            },
            {
                "flag": "",
                "long": "--list-archive",
                "arg": null,
                "description": "List the locales contained in the locale archive file."
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": "Specify the file that defines the character set that is used by the input file. If charmapfile contains a slash character ('/'), it is interpreted as the name of the character map. Otherwise, the file is sought in the current directory and the default directory for character maps. If the environment variable I18NPATH is set, $I18NPATH/charmaps/ and $I18NPATH/ are also searched after the current directory. The default directory for character maps is printed by localedef --help."
            },
            {
                "flag": "-i",
                "long": null,
                "arg": null,
                "description": "Specify the locale definition file to compile. The file is sought in the current di‐ rectory and the default directory for locale definition files. If the environment variable I18NPATH is set, $I18NPATH/locales/ and $I18NPATH are also searched after the current directory. The default directory for locale definition files is printed by localedef --help."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "Read mappings from symbolic names to Unicode code points from repertoirefile. If repertoirefile contains a slash character ('/'), it is interpreted as the pathname of the repertoire map. Otherwise, the file is sought in the current directory and the default directory for repertoire maps. If the environment variable I18NPATH is set, $I18NPATH/repertoiremaps/ and $I18NPATH are also searched after the current directory. The default directory for repertoire maps is printed by localedef --help."
            },
            {
                "flag": "-A",
                "long": null,
                "arg": null,
                "description": "Use aliasfile to look up aliases for locale names. There is no default aliases file."
            },
            {
                "flag": "-c",
                "long": "--force",
                "arg": null,
                "description": "Write the output files even if warnings were generated about the input file."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Generate extra warnings about errors that are normally ignored."
            },
            {
                "flag": "",
                "long": "--big-endian",
                "arg": null,
                "description": "Generate big-endian output."
            },
            {
                "flag": "",
                "long": "--little-endian",
                "arg": null,
                "description": "Generate little-endian output."
            },
            {
                "flag": "",
                "long": "--no-archive",
                "arg": null,
                "description": "Do not use the locale archive file, instead create outputpath as a subdirectory in the same directory as the locale archive file, and create separate output files for locale categories in it. This is helpful to prevent system locale archive updates from over‐ writing custom locales created with localedef."
            },
            {
                "flag": "",
                "long": "--no-hard-links",
                "arg": null,
                "description": "Do not create hard links between installed locales. --no-warnings=warnings Comma-separated list of warnings to disable. Supported warnings are ascii and intcurrsym."
            },
            {
                "flag": "",
                "long": "--posix",
                "arg": null,
                "description": "Conform strictly to POSIX. Implies --verbose. This option currently has no other ef‐ fect. POSIX conformance is assumed if the environment variable POSIXLYCORRECT is set. --prefix=pathname Set the prefix to be prepended to the full archive pathname. By default, the prefix is empty. Setting the prefix to foo, the archive would be placed in foo/usr/lib/lo‐ cale/locale-archive."
            },
            {
                "flag": "",
                "long": "--quiet",
                "arg": null,
                "description": "Suppress all notifications and warnings, and report only fatal errors."
            },
            {
                "flag": "",
                "long": "--replace",
                "arg": null,
                "description": "Replace a locale in the locale archive file. Without this option, if the locale is in the archive file already, an error occurs. --warnings=warnings Comma-separated list of warnings to enable. Supported warnings are ascii and intcurrsym. -?, --help Print a usage summary and exit. Also prints the default paths used by localedef."
            },
            {
                "flag": "",
                "long": "--usage",
                "arg": null,
                "description": "Print a short usage summary and exit."
            },
            {
                "flag": "-V",
                "long": "--version",
                "arg": null,
                "description": "Print the version number, license, and disclaimer of warranty for localedef."
            }
        ],
        "examples": [
            "Compile the locale files for Finnish in the UTF-8 character set and add it to the default lo‐",
            "cale archive with the name fiFI.UTF-8:",
            "localedef -f UTF-8 -i fiFI fiFI.UTF-8",
            "The next example does the same thing, but generates  files  into  the  fiFI.UTF-8  directory",
            "which  can  then be used by programs when the environment variable LOCPATH is set to the cur‐",
            "rent directory (note that the last argument must contain a slash):",
            "localedef -f UTF-8 -i fiFI ./fiFI.UTF-8"
        ],
        "see_also": [
            {
                "name": "locale",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/locale/1/json"
            },
            {
                "name": "charmap",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/charmap/5/json"
            },
            {
                "name": "locale",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/locale/5/json"
            },
            {
                "name": "repertoiremap",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/repertoiremap/5/json"
            },
            {
                "name": "locale",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/locale/7/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": [
                    {
                        "name": "localedef --help",
                        "lines": 1
                    },
                    {
                        "name": "localedef --usage",
                        "lines": 1
                    },
                    {
                        "name": "localedef --version",
                        "lines": 1
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Operation-selection options",
                        "lines": 3
                    },
                    {
                        "name": "--add-to-archive",
                        "lines": 3,
                        "long": "--add-to-archive"
                    },
                    {
                        "name": "--delete-from-archive",
                        "lines": 2,
                        "long": "--delete-from-archive"
                    },
                    {
                        "name": "--list-archive",
                        "lines": 2,
                        "long": "--list-archive"
                    },
                    {
                        "name": "Other options",
                        "lines": 4
                    },
                    {
                        "name": "-f --charmap=",
                        "lines": 7,
                        "flag": "-f"
                    },
                    {
                        "name": "-i --inputfile=",
                        "lines": 6,
                        "flag": "-i"
                    },
                    {
                        "name": "-u --repertoire-map=",
                        "lines": 7,
                        "flag": "-u"
                    },
                    {
                        "name": "-A --alias-file=",
                        "lines": 2,
                        "flag": "-A"
                    },
                    {
                        "name": "-c --force",
                        "lines": 2,
                        "flag": "-c",
                        "long": "--force"
                    },
                    {
                        "name": "-v --verbose",
                        "lines": 2,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "--big-endian",
                        "lines": 2,
                        "long": "--big-endian"
                    },
                    {
                        "name": "--little-endian",
                        "lines": 2,
                        "long": "--little-endian"
                    },
                    {
                        "name": "--no-archive",
                        "lines": 5,
                        "long": "--no-archive"
                    },
                    {
                        "name": "--no-hard-links",
                        "lines": 6,
                        "long": "--no-hard-links"
                    },
                    {
                        "name": "--posix",
                        "lines": 9,
                        "long": "--posix"
                    },
                    {
                        "name": "--quiet",
                        "lines": 2,
                        "long": "--quiet"
                    },
                    {
                        "name": "--replace",
                        "lines": 10,
                        "long": "--replace"
                    },
                    {
                        "name": "--usage",
                        "lines": 2,
                        "long": "--usage"
                    },
                    {
                        "name": "-V --version",
                        "lines": 2,
                        "flag": "-V",
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "ENVIRONMENT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 57,
                "subsections": []
            },
            {
                "name": "CONFORMING TO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COLOPHON",
                "lines": 7,
                "subsections": []
            }
        ]
    }
}