[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Language detection (was: First ES translation patch and something else)



On Sat, 2009-10-31 at 06:48 +0100, Nikola Smolenski wrote:
> Дана Friday 30 October 2009 16:11:35 Ernesto Domato написа:
> > Yeah, I know that. Did you do it cross-platform?, because I have no
> > experience programming for other platform other than Linux and I'd
> > like to see how you managed it.
[...]
> Well, it is cross-platform in that it works properly with KDE and Gnome, but 
> other than that, no. I don't know how to do it on Windows, and of course have 
> no idea how to do it on embedded systems.

Well, different Linux desktops certainly isn't cross-platform. It's not
too big of a deal, though, since we can actually implement language
detection on a per-platform basis as needed. In any case, no platform
will be worse off than it is right now.

[...]
> // Desktop environment detection done according to
> // http://flyback.googlecode.com/svn/trunk/src/desktop.py
> if(getenv("KDE_FULL_SESSION") || getenv("KDE_MULTIHEAD")) {

Eek! Now that's horrible! Even if we add per-platform code I certainly
don't want per-desktop code in there. I don't know how KDE does stuff,
but Gnome uses LANG and LC_* just like any other UNIX platform should.
That's basically the *only* approach I consider sane on UNIX systems.
Anything else will result in a horrible mess.

Jens