> * Would this be a suitable approach for determining available languages for message translation?
My first reaction to that was "but what if I actually want the Swiss German variant?". While it's unusual, we can in theory have e. g. Swiss or Austrian specific German translations. But on second thought, this solves it:
> * Is listing the /usr/share/locale-langpack directory a safe way to find available translations, or is there more into it?
This is actually a very nice idea. As long as we don't actually have actual country specific variants of a language (like de), it wouldn't show them at all, but it would retain the country specific variants that we really need (such as en_GB or pt_BR).
The only problem here is that /usr/share/locale-langpack/ is an Ubuntuism and not compatible with any other distribution or upstream, but that boat already left a while ago anyway :-) So this isn't a blocker.
> * As regards languages with more than one translation: When the country is not specified, does it matter which of the locales that is assigned to the LC_MESSAGES environment variable?
No, it doesn't for messages. It is relevant for $LANG and other LC_* categories, of course.
I guess for the actual implementation in l-s and gdm we don't need to parse /usr/share/xml/iso-codes/, as these already have the translated names of the locales?
> * Would this be a suitable approach for determining available languages for message translation?
My first reaction to that was "but what if I actually want the Swiss German variant?". While it's unusual, we can in theory have e. g. Swiss or Austrian specific German translations. But on second thought, this solves it:
> * Is listing the /usr/share/ locale- langpack directory a safe way to find available translations, or is there more into it?
This is actually a very nice idea. As long as we don't actually have actual country specific variants of a language (like de), it wouldn't show them at all, but it would retain the country specific variants that we really need (such as en_GB or pt_BR).
The only problem here is that /usr/share/ locale- langpack/ is an Ubuntuism and not compatible with any other distribution or upstream, but that boat already left a while ago anyway :-) So this isn't a blocker.
> * As regards languages with more than one translation: When the country is not specified, does it matter which of the locales that is assigned to the LC_MESSAGES environment variable?
No, it doesn't for messages. It is relevant for $LANG and other LC_* categories, of course.
I guess for the actual implementation in l-s and gdm we don't need to parse /usr/share/ xml/iso- codes/, as these already have the translated names of the locales?
Thanks for working on this!