validlocale(8)

๐Ÿ’– validlocale(8) ๐Ÿ’–

Manual name: validlocale(8). โœจ

๐ŸŒธ NAME ๐ŸŒธ

validlocale - Test if a given locale is available ๐Ÿ’…

๐Ÿฆ‹ SYNTAX ๐Ÿฆ‹

validlocale <locale>

โœจ DESCRIPTION โœจ

okay so validlocale checks whether the locale you hand it is actually a valid one ๐Ÿ” If it isn't, it prints the line you'd need to add to /etc/locale.gen on stdout, so locale-gen can generate that locale (assuming it exists at all ๐Ÿ’€).

๐ŸŽ€ FILES ๐ŸŽ€

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

๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

  • DEFAULTCHARSET โ€” this is the charset it assumes when the locale you gave it isn't in the supported list ๐Ÿซถ

๐Ÿ“ EXAMPLES ๐Ÿ“

bestie, here's the vibe. If you pass in a valid locale, it tells you so on stderr ๐Ÿฅฐ

% validlocale C
locale 'C' valid and available

Now if the locale is invalid (not generated, or just nonexistent ๐Ÿ˜ญ), it tells you on stderr that it's not available, and then prints the line for /etc/locale.gen on stdout so you can get it generated ๐Ÿ™ˆ

% validlocale de_AU@euro
locale 'de_AU@euro' not available
de_AU@euro ISO-8859-15

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

Petter Reinholdtsen <pere@hungry.com> ๐Ÿงš

๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

locale-gen(8), localedef(1), locale(1) ๐Ÿ’œ


Source credit goes to Petter Reinholdtsen, version 0.1 ๐Ÿ“ฆ Stay iconic, bestie, and go validate some locales ๐Ÿ’…๐Ÿซถโœจ