fosskers/aura — pull request #74 by brcha (2013-02-17 18:28:31+00:00)
Title: Support for $LANG environment variable

I added the support for reading $LANG environment variable to determine which language should be used. Of course, if --language argument is given, it will be used instead of the $LANG variable.

For translators the most important function is getLanguageFromEnvironment in Aura/Languages.hs. It defines currently supported languages (ie. language codes) and fall backs to English if neither the command line argument is supplied nor there is a $LANG environment variable. It uses pattern matching (serbian is matched with ('s':'r':xs) for example) which might be dificult for non-haskellers, but that was the most straight forward solution to xx_YY@zzz.www style language codes with most parts being optional.