store language preference in localStorage