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.
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