On 08.09.2011 06:17, Eric Wasylishen wrote:
Hi, I was experimenting with changing my system language (Ubuntu
10.10) and ran in to a problem: I set the language in Ubuntu's
language settings tool to Canadian French but was not getting any
French translations showing up in GNUstep apps.

I didn't touch the NSLanguages user default, but when I tried reading
it in an application, it returned ("CanadianFrench", "English").

The following patch fixes this problem by expanding regional locales
into their more general variants - so "CanadianFrench" is expanded to
("CanadianFrench", "French") Also, it adds support for reading the
LANGUAGE environment variable, a GNU extension, which lets you
specify a list of locales like "de:fr_CA:en" if you wanted to see
German, then Canadian French, then English in order of preference. In
other words, it has the same role as the GNUstep LANGUAGES
environment variable, but it's used by GNU gettext/gtk/probably
others. According to the gettext docs, if LANGUAGE is set it is
supposed to take precedence over LC_MESSAGES and LANG.

Looks like a great patch to me. We should integrate this right after the next base release. (Hint!)

You are aware that your last example, "de:fr_CA:en", will result in something like ("German", "CanadianFrench", "French", "English")? I think is is debatable where "French" should be put in this list, but the current solution is fine with we.

_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to