omgmog/install-all-firefox — pull request #48 by maximerety (2014-07-30 09:55:38+00:00)
Title: Fallback to a valid system locale if country code is not supported

The typical use case is when your LANG env variable contains a "country-based" locale (ex: "fr-FR") which is not available for download on the FTP.

We could automatically fall back on the basic locale (with no country subtag) if available for download (ex: "fr").

```bash
$ echo $LANG
# fr-FR.UTF-8

$ ./firefoxes.sh 31
# Your system locale "fr-FR" is not available, but "fr" is!
# We'll use "fr" as the default locale if you've not specified a valid locale.
# "" was not found in our list of valid locales.
# We're using fr as your locale.
# [...]
```

This makes the script work out of the box for some people without the need to explicitly pass a locale.