Allow arbitrary locale values

There are currently some restrictions on locale names:

Either 2-4 lowercase characters or 2-4 lowercase characters followed by a dash and either 2 or 4 more lowercase characters.

So xx-xx and xx-xxxx are allowed, xx-xxx is not.

This seems like an arbitrary restriction. It would be great to allow any value, as we could then use the locale value directly in the URL – allowing locales like en-dev or en-europe without any inbetween mapping.