Open main menu

Changes

158 bytes added ,  21:36, 7 November 2008
no edit summary
== Intro ==I was having locale problems. Why? I don't know. But all of a sudden, applications like K3B ('''see the hack at the end of this article''') would complain about locales not being properly set.
For example, viewing a man page in Konsole would generate a warning about "LC_ALL" not being set
</pre>
then I did a
<source lang="bash">
sudo dpkg-reconfigure locales
That command seems to regenerate all the locales in <code>/usr/lib/locale/</code>
== Documentation ==
There are a dizzying number of files, programs and settings involved in locale; and worse -- there are differences between distributions on what commands work, how they work; and where the configurations are stored.
I suggest that you start off with
<source lang="bash">
man:/locale-gen
All the files in <code>/var/lib/belocs</code>
will get updated when you run
<source lang="bash">
sudo dpkg-reconfigure locales
locale
locale -a
locale -m
</pre>
are
in
<code>/etc/default/locale</code>
I have these two lines:
LANGUAGE="en_US:en"
</pre>
in
<code>/etc/environment</code>
I have
LANG="en_US.UTF-8"
</pre>
in
<code>/usr/share/i18n/SUPPORTED</code>
there is a very long list of the supported locales. You can take any number of them and add them to your
<code>/var/lib/locales/supported.d/local</code>
{{ambox
|text= Caution: each supported locale on your system will take up something like 50MB of space -- so don't choose them all.
}}
== Workaround Hack ==
Setting environment variables prior to launching an application is one way to work around this problem, but obviously does not solve it on a system-wise basis. I used this command in KMenu to get around the fact that the variable ''was'' set system-wide, but didn't get picked up in the application environment:
<codesource lang="bash">
env LC_ALL='en_US.UTF-8' && k3b %U
# or the simplerLC_ALL=en_US.UTF-8 k3b %U</codesource>
and appended to an existing bug report with the workaround information
(note that double quotes do not work in the KMenu environment.)
[[Category:Howto]]
[[Category:System Administration]]
4,558

edits