Change locale by detecting viewer’s browser language setting and let them choose prefered language after

You can get the browser language from the PHP global $_SERVER['HTTP_ACCEPT_LANGUAGE'] )