728x90 AdSpace

Saturday, 16 September 2017

locale Linux Command


locale [options] [name]
Print report on current locale settings. Locales determine the country-specific settings for a system, including character encodings, the formatting of dates, honorifics, diagnostic messages, currency, printer-paper sizes, and default measurements. Locale settings are essentially a dictionary of settings specified by keyword. The keywords are grouped together into related categories whose names begin with LC_. Each category has a related environment variable of the same name from which it will read its locale setting. Supply keyword or category names as name to examine their values. Multiple names may be given. You can also use the special keyword charmap to see the current character mapping. When executed with no arguments, locale prints the value of all locale-related environment variables.


Print all available locale settings installed on the system.

Print the category related to each name argument.

Print keywords along with their settings for each name argument.

Print all available character maps.

Environment variables

The default value for unset internationalization variables. If not set, the system's default value is used.

Postal settings, country, and language names and abbreviation.

String and character sorting and comparison settings.

Character attributes, including case conversion mappings, and categories of characters (whitespace, digit, lower, upper, punctuation, etc.).

Information related to the current locale definition, including its title, source, revision, and contact information for its author.

Measurement units, metric or other.

Settings for yes/no prompts and other informative and diagnostic messages.

Currency formats and symbols.

Formats for names and honorifics.

Nonmonetary number formats.

Default paper sizes for printing and pagination.

Telephone number formats.

Date and time formats.

When set, overrides the values of all other internationalization variables.

The path for finding message catalogs used in processing messages.


Print the category name and all keywords for date and time settings:

locale -ck LC_TIME

Print the strings used for days of the week and months of the year:

locale day mon
Annamalai Thangaraj

Annamalai is working as Technical Lead in Leading Telecom company with 5+ years experience in Identity and Access Management , Telecom and Networks, BigData, Java, Spring, Struts, Hibernate, AngularJS, and Enterprise Web Application Development.

Website: Java Tutorials Corner

Shop and help us

Flipkart Offer Snapdeal offer Amazon.in offer Amazon.com offer
  • Blogger Comments
  • Facebook Comments
  • Disqus Comments


Post a Comment

Item Reviewed: locale Linux Command Rating: 5 Reviewed By: Annamalai Thangaraj