implement match_language_tag, which was really the point of all this