2.3 Localization Flashcards
Why is it important to configure locale settings?
The locale settings determine the way inforation is displayed on the computer and how data is encoded. If set incorrectly, information may be presented to users in ways that are unfamiliar to them, and data integrity issues may occur within applications and databases.
What type of elements can be configured using the locale settings?
The locale settings can configure the language and encoding of the text displayed on screen, character classes, sort order, number formatting, currency type, currency format, and date/time format.
What is the syntax of the locale settings?
The locale setting uses the format: Language_territory.codset@modifier. Examples: en_GB.UTF-8 and de_DE.euro.
Which environment variable overrides all other locale settings?
The LC_ALL variable is a special variable for overriding all other settings. It sets all locales to the same setting.
What is a locale?
A locale is a set of files that Linux uses to determine country and language-specific settings for various applications.
What does the locale setting do?
The locale setting determines the way data displays on a computer:
- The language and encoding of the text displayed on screen
- Character classes
- Sort order
- Number formatting
- Currency type and format
- Date and time display
What are the key characteristics of the locale setting?
The locale setting:
- Uses configuration files that are part of the system library and are located in /usr/share/locale on most distributions.
- Uses language codes specified in ISO-639 and county codes specified in ISO-3166.
- Uses the format: language_territory.codset@modifier. Examples: en_GB.UTF-8, de_DE.euro, and en_IE.iso885915@euro.
How are locale codes implemented?
Locale codes are implemented using environment variables. For example LANG=en_US.UTF-8 specifies that the computer uses US English with a UTF-8 encoding when displaying information.
What are the four components of the locale setting?
- Language - ISO 639 language code, always lowercase
- Territory - ISO 3166 country code, always uppercase
- Codeset - Encoding format, such as UTF-8 or UTF-16
- Modifier - Seldom used
What is the order of precedence for the locale variables?
- If the LC_ALL variable is set, it overrides all LC_* variables, whether they are set or not. They are not even checked.
- if the LC_ALL variable is not set or is null, then the values of the individual LC_* variables are used.
- if the LC_ALL variable is not set and an individual LC_* variable is not set or is null, then the value of the LANG variable is used as the value of the unset LC_* variable.
How do you view all current locale settings?
The locale command displays all current locale settings.
What does the locale command do?
The locale command displays all current locale settings.
How do you view the current encoding being used on the system?
The locale charmap command displays the current encoding being used on the system.
What does the locale charmap command do?
The locale charmap command displays the current encoding being used on the system.
How do you view a list of all available locale settings on the system?
The locale -a command displays a list of all available locale settings on the system.