How to Set System-Wide Default Locale?

Ok, I’m banging my head here, and I don’t think openSUSE is the only distro I’ve run into this one. Basically, how do I set the global system-wide locale? Everything I’ve tried thus far hasn’t been truly global. For example, no matter what I do running env -i locale still outputs the following:

LANG=LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

This somewhat simulates the situation when I run something via a init.d script, or as a cronjob, where the environment might be cleared or reset. Anyone know how to properly set the system to “en_AU.UTF-8”?

Cheers,
Tom

On 2013-10-01 00:16, tomwardrop wrote:
>
> Ok, I’m banging my head here, and I don’t think openSUSE is the only
> distro I’ve run into this one. Basically, how do I set the global
> system-wide locale? Everything I’ve tried thus far hasn’t been truly
> global.

In YaST (language).

However, root is different. It can follow the default or not, because of
“ROOT_USES_LANG” in “/etc/sysconfig/language”

> This somewhat simulates the situation when I run something via a init.d
> script, or as a cronjob, where the environment might be cleared or
> reset. Anyone know how to properly set the system to “en_AU.UTF-8”?

Those scripts may set their own “locale”, to avoid problems.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)