validlocale(8)

validlocale8

Test if a given locale is available

Usage

validlocale <locale>

Overview

Test if the locale given as argument is a valid locale. If it isn't, print on stdout the string to add to /etc/locale.gen to make locale-gen generate the locale (if it exists at all).

Files

/usr/sbin/validlocale
/usr/share/i18n/SUPPORTED

Environment

DEFAULTCHARSET

Which charset to assume if the given locale is missing from the list of supported locales.

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 de_AU@euro
locale 'de_AU@euro' not available
de_AU@euro ISO-8859-15

Releases

11 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0–5.0
  3. 6.0–13

Authors

Petter Reinholdtsen <[email protected]>

From locales 2.41-12+deb13u4 in Debian 13 (Trixie). Parsed by carta from the page's man source.