lk/basics/locale.md

56 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2022-01-16 18:20:39 +00:00
---
title: "locale"
2022-01-26 21:29:48 +00:00
tags: [ "Documentation", "Basics" ]
2022-01-16 18:20:39 +00:00
---
2020-01-02 00:04:35 +00:00
Your locale tells the computer your location, preferred time-and-date format, standard language, papersize, et c.
2020-01-02 00:04:35 +00:00
A list of supported locales is available at /usr/share/i18n/SUPPORTED
See a full list with:
```bash
cat /usr/share/i18n/SUPPORTED
```
2020-01-02 00:04:35 +00:00
Take the first portion to generate full locale information for a region:
```bash
locale-gen ru_RU.UTF-8
```
2020-01-02 00:04:35 +00:00
Then use this for the current shell session with
```bash
LANG=ru_RU.utf8
```
2020-01-02 00:04:35 +00:00
Expand this to the entire system with:
```bash
export LANG=ru_RU.utf8
```
2020-01-02 00:04:35 +00:00
You can make this permanent for one user by adding this line to the ~/.profile or ~/.bashrc.
Make it permanent for the entire system by editing:
```bash
sudo vim /etc/defaults/locale
```
2020-01-02 00:04:35 +00:00
# Variables
While generally set together, the variables setable are:
2021-06-09 00:44:55 +00:00
| Variable | Description |
|:-------------------------------------:|:---------------------------------------------------------------|
| LC_TIME | Date and time |
| LC_NUMERIC | Nonmonetary numeric formats |
| LC_PAPER | A4 vs wrong paper |
| LC_ADDRESS | Address formats, for those amazingly concise Polish addresses. |
| LC_TELEPHONE | Telephone number formats. |
| LC_MEASUREMENT | Metric or Imperial, but no Impetric available. |
| LC_IDENTIFICATION | Metadata about the locale information |
| LC_ALL | Just everything at once. |
2020-01-02 00:04:35 +00:00