There are a lot of questions here about how to set these variables but none about how they work.
If I type locale in a terminal it shows me a bunch of variables:
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
However, these don't exist on the system. Doing a echo returns blank string echo $LC_MONETARY.
I presume that the utility is reading some database and printing env vars that can be customized and set to override the defaults?
- What is the database being read? Can it be edited directly without using these vars to override its settings?
- If these vars are set, what system component uses them. Are these used by any user space programs?
- Is
localepart of a package that comes with other utilities? - Are the variables part of a standard and found on all distros?
Any reference to documentation that explains the LC_ vars and locale utility would be appreciated. Most web articles I found explain how to use these, but not the design/architecture of the locale system.
man -k locale?LC_*envvar doesn't exists,setlocale(LC_*, "")guesses it fromLANG, andLC_ALLoverrides it.LANG=en_GB.UTF-8or theLC_ALL=en_GB.UTF-8envvar set.