add dialect support

If the page is cached then we don't want to serve a detected_locale because it could get saved into the cache. At which point we don't know what language a cached page is in because we only cache against urls.