The php script can't be converted to javascript but this can still be done. Just remember that since the scrip is now client side you need to work around the browsers. Below is an IE/Netscape script. It probably works with other browsers though and you can see what you'd need to do for more cross compatibility.
It has 3 languages you can determine pages for (one else, two else ifs) and a defaukt page. You can change all of those details easily and have different numbers of languages detected.
Gimme a holler if you need help tweaking it.
Code:<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if (navigator.appName == 'Netscape')
var language = navigator.language;
else
var language = navigator.browserLanguage;
if (language.indexOf('en') > -1) document.location.href = 'english.html';
else if (language.indexOf('de') > -1) document.location.href = 'german.html';
else if (language.indexOf('it') > -1) document.location.href = 'italian.html';
else
document.location.href = 'defaultpage.html';
// End -->
</script>