Regularize the locale code

This will attempt to regularize the locale code parsed from the HTTP header.