Fallback v2

locale validity checking should not be done just here.
It's possible that the user has an invalid locale in the database (for instance, in the case where language support is removed)

So just have this method do one thing, return the locale_in_query from the url. And try to use the same method to filter invalid locales everywhere in this file.