MrGlockenspiel / activate-linux

The "Activate Windows" watermark ported to Linux
GNU General Public License v3.0
4.52k stars 94 forks source link

add two letter language code fallback #213

Closed Ruby-Dragon closed 2 months ago

Ruby-Dragon commented 2 months ago

If a language is not found in the languages list due to the country code not matching, activate-linux used to fallback to English. This change matches the first two letters of the language code to allow for the closest language found to be used instead.

For example, if someone was using activate-linux in Mexico, their code would be es_MX. Since we do not have an es_MX translation, they would get English instead of Spanish, even though we have an es_ES translation. With this change, somebody with an es_MX code will get the es_ES translation by default. If this behavior is undesired, they can override it using the LANG environment variable.

This solves issue #202