[kde-linux] Wrong language detection in KDE since 3.1
Christian Esken (esken.de)
chris at esken.de
Fri Mar 28 21:41:03 GMT 2003
Am Friday 28 March 2003 21:58 schrieb Lukáš Tinkl:
> Dne pá 28. března 2003 17:01 Ingo Klöcker napsal(a):
> > Why is KDE's behavior wrong? Let's have a look at the man page for
> > locale(7):
> > =====
> > If the second argument to setlocale() is empty string, "", for the
> > default locale, it is determined using the following steps:
> > 1. If there is a non-null environment variable LC_ALL, the value of
> > LC_ALL is used.
> > 2. If an environment variable with the same name as one of the
> > categories above exists and is non-null, its value is used for that
> > category.
> > 3. If there is a non-null environment variable LANG, the value of LANG
> > is used.
So the correct preference order is:
LANG
LC_MESSAGES
LC_ALL
> > According to the aforementioned man page to following change would
> > correct KDE's language determination:
> > =====
> > - langs << QFile::decodeName( ::getenv("LC_CTYPE") );
> > - langs << QFile::decodeName( ::getenv("LC_MESSAGES") );
> > langs << QFile::decodeName( ::getenv("LC_ALL") );
> > + langs << QFile::decodeName( ::getenv("LC_MESSAGES") );
> > langs << QFile::decodeName( ::getenv("LANG") );
Doesn't this do prefefence on LC_ALL?!? Looks wrog to me.
Chris
More information about the kde-core-devel
mailing list