Can shorten it quite a bit:
PHP Code:
if ( ($_SERVER["HTTP_ACCEPT_LANGUAGE"] != "") && ($_SERVER["HTTP_ACCEPT_LANGUAGE"] != 'en'))
{
$file = 'index_'.substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2).'.html';
if(file_exists($file))
{
header("Location: ".$file);
exit;
}
}
// no index for specific language specified
header("Location default.html");