n/localectl.md: almost rewrite the page

This commit is contained in:
Aminda Suomalainen 2024-06-02 11:23:41 +03:00
parent 3d92a95a3b
commit a38abd5318
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
1 changed files with 39 additions and 31 deletions

View File

@ -23,7 +23,7 @@ robots: noai
<em lang="fi">Automaattinen sisällysluettelo</em> / <em lang="en">Automatically generated Table of Contents</em> <em lang="fi">Automaattinen sisällysluettelo</em> / <em lang="en">Automatically generated Table of Contents</em>
- [Ready commands](#ready-commands) - [Ready commands](#ready-commands)
- [Internationalish](#internationalish) - [Finland compatible internationalish English](#finland-compatible-internationalish-english)
- [Finland Finnish](#finland-finnish) - [Finland Finnish](#finland-finnish)
- [Explanations](#explanations) - [Explanations](#explanations)
@ -34,34 +34,34 @@ robots: noai
## Ready commands ## Ready commands
### Internationalish ### Finland compatible internationalish English
`% sudo localectl set-locale LANG=en_GB.utf8 LC_TIME=en_DK.utf8 LC_MONETARY=fi_FI.utf8 LC_NAME=fi_FI.utf8 LC_TELEPHONE=fi_FI.utf8` ```bash
sudo localectl set-locale LANG=en_IE.utf8 LC_TIME=en_DK.utf8 LC_MONETARY=fi_FI.utf8 LC_NAME=fi_FI.utf8 LC_TELEPHONE=fi_FI.utf8
```
- This will speak English, but use euros and other Finnish cultural defaults, while time is shown as ISO 8601. - Everything will be in English, but time will be in ISO 8601, financial units use Finnish separators, names are sorted according to Finnish alphabet (a, …, x, y, z, å, ä, ö) and phone numbers begin with the Finnish `+358` prefix.
### Finland Finnish ### Finland Finnish
`% sudo localectl set-locale LANG=fi_FI.utf8 LC_TIME=fi_FI.utf8 LC_MONETARY=fi_FI.utf8 LC_NAME=fi_FI.utf8 LC_TELEPHONE=fi_FI.utf8` ```
sudo localectl set-locale LANG=fi_FI.utf8 LC_TIME=fi_FI.utf8 LC_MONETARY=fi_FI.utf8 LC_NAME=fi_FI.utf8 LC_TELEPHONE=fi_FI.utf8
```
## Explanations ## Explanations
- LANG is the language and defaults for other variables if they are unset - LANG is the language and defaults for other variables if they are unset.
and as I said I prefer en_GB which is better in Europe for matching the en_DK gives ISO 8601 date format for everything respecting LC_TIME.
standards better than en_US. - `LANG=en_IE date` returns `Sun 02 Jun 2024 11:05:04 EEST`,
- LC_TIME sets the time format and en_DK gives ISO 8601 date format for while `LANG=en_DK date` returns `2024-06-02T11:05:04 EEST`.
everything respecting LC_TIME (at least `date` and M̀ATE panel clock - LC_MONETARY sets the currency and how sums of it are managed.
don't respect it). - LC_NAME sets name format and I prefer Finnish (just the name) to Irish
- LC_MONETARY sets the currency and how sums of it are managed and the which probably has `M{r,s,rs}` and I hate them being gendered and I doubt it
only issue with en_GB is it using £ instead of € which affects at least understands Mx.
spreadsheets.
- LC_NAME sets name format and I prefer Finnish (just the name) to British
which has ms/mrs/mr and I hate them being gendered and I doubt it
understands mx.
- LC_TELEPHONE sets telephone number format and I set it to fi_FI as it - LC_TELEPHONE sets telephone number format and I set it to fi_FI as it
defaults international numbers to +358 and I am more likely to be typing defaults international numbers to +358 and I am more likely to be typing
Finnish numbers than British. I imagine it can affect office tools, and Finnish numbers than Irish. I imagine it can affect office tools, and
it's here more just in case. it's here more of just in case.
And naturally to use these locales, they must be compiled. And naturally to use these locales, they must be compiled.
@ -69,7 +69,7 @@ So `/etc/locale.gen` must include the lines
``` ```
en_DK.UTF-8 UTF-8 en_DK.UTF-8 UTF-8
en_GB.UTF-8 UTF-8 en_IE.UTF-8 UTF-8
# If you don't have en_US, things will break! # If you don't have en_US, things will break!
en_US.UTF-8 UTF-8 en_US.UTF-8 UTF-8
fi_FI.UTF-8 UTF-8 fi_FI.UTF-8 UTF-8
@ -82,25 +82,27 @@ the editing and locale-gen and that is probably what you are supposed to
use.) use.)
It seems like I didn't even say anything about that UTF-8 part, but It seems like I didn't even say anything about that UTF-8 part, but
it's 2016 and everything is UTF-8 (or your things are horribly broken it's 2024 and everything is UTF-8 (or your things are horribly broken
and the rest of the world hates you). and the rest of the world hates you).
Sources/thanks: Sources/thanks:
- [Arch Wiki: Locale, LC_TIME](https://wiki.archlinux.org/index.php/locale#LC_TIME:_date_and_time_format) - [Arch Wiki: Locale, LC_TIME](https://wiki.archlinux.org/index.php/locale#LC_TIME:_date_and_time_format)
- [Locale Helper: en_GB](https://lh.2xlibre.net/locale/en_GB/) - [Locale Helper: en_IE](https://lh.2xlibre.net/locale/en_IE/)
- [Locale Helper\_ fi_FI](https://lh.2xlibre.net/locale/fi_FI/) - [Locale Helper: fi_FI](https://lh.2xlibre.net/locale/fi_FI/)
- [Wikipedia: UTF-8](https://en.wikipedia.org/wiki/UTF-8) - [Wikipedia: UTF-8](https://en.wikipedia.org/wiki/UTF-8)
- Random misplaced advice on disabling charset fallback in your - Random misplaced advice: disable charset fallback in your
IRC client and being UTF-8 only so you see when someone is not IRC client and be UTF-8 only! You will see when someone is not
using UTF-8 and don't submit useless bug reports to using UTF-8 and won't submit useless bug reports to
bots/bridges/whatever thare are UTF-8 only as supporting every bots/bridges/whatever that are UTF-8 only (as supporting every
charset is not possible as IRC has nothing to declare character charset is impossible, since IRC has nothing to declare character
set and there is zero reason why you wouln't be using UTF-8! set, and there is zero reason why you wouln't be using UTF-8! Well nowadays
some have [IRCv3 `UTF8ONLY` `ISUPPORT` token](https://ircv3.net/specs/extensions/utf8-only)).
- [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
- You should read it or at least be aware of it especially if you are - You should read it or at least be aware of it especially if you are
in contact with people from other countries and even more if you in contact with people from other countries and even more if you
are in international communities! are in international communities trying to get anything done with
anything that has to do with time or date!
--- ---
@ -112,4 +114,10 @@ Either I was wrong on it being list of fallback languages I wish to use, or
GNOME has different view on it, but as I think I have seen errors related GNOME has different view on it, but as I think I have seen errors related
to it before, I will drop `LANGUAGE` from the variables I set. to it before, I will drop `LANGUAGE` from the variables I set.
2024-04-04: `export LANGUAGE=eo:fi:en` in a file read by my `zshrc` works fine as it gets read before my `startsway` anyway ---
2024-04-04: `export LANGUAGE=eo:fi:en` in a file read by my [`zshrc`](https://gitea.blesmrt.net/mikaela/shell-things/src/branch/master/rc/zshrc) works fine as it gets read before my [`startsway`](https://gitea.blesmrt.net/mikaela/scripts/src/branch/master/bash/usr-local-bin/startsway) anyway.
---
2024-06-02: fixed a lot of language, practically rewrote the page.