playframework/playframework — pull request #1701 by smola (2013-09-18 13:19:57+00:00)
Title: Normalize Lang: lowercase lang, uppercase country.

I ran into a problem when comparing two Lang objects for equality and getting false because one had uppercase country code and the other had a lowercase one. This is an unnecessary inconvenience when we deal with language codes that come from case insensitive source (e.g. a domain name).

So I think it would be good to have the caseness of Langs normalized on object creation. This is also more consistent with `java.util.Locale`:

```
scala> Locale.forLanguageTag("en-US").equals(Locale.forLanguageTag("en-us"))
res1: Boolean = true
```

Please: Note that this commit is untested.