PHP and JavaScript utilities to detect the browser language