Autodetect locale and cache it on first visit.