Add function to detect browser language