saving autodetected language in localstorage