4

In Debian, I am used to set the LANGUAGE environment variable in /etc/environment. Now with Debian testing I found /etc/default/locale, which is updated by update-locale. The update-locale man page states it performs some sanity checks but never details them, so: what are these checks? are they important or even essential? can I set /etc/default/locale as I did /etc/environment, or should I absolutely use update-locale?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
Leandro
  • 228
  • 1
  • 11

1 Answers1

5

There are just two sanity checks:

  • the requested locale must exist (otherwise update-locale exits and /etc/default/locale isn't modified)
  • if a value is specified for LANGUAGE, it must be valid (otherwise it is ignored)

So there's nothing which requires you to use update-locale instead of editing /etc/default/locale yourself, but it is a good idea to use it to avoid mistakes.

Stephen Kitt
  • 411,918
  • 54
  • 1,065
  • 1,164
  • Thanks a lot, that was exactly what I was looking for. Since I always did `/etc/environment`, I guess I am qualified enough to do `/etc/default/locale` myself, if only because I am too lazy to use `update-locale`. Not that it takes much more effort. – Leandro Mar 01 '17 at 23:12