# Setup our languages... (the order is not important)
$knownlangs = array('nl', 'tr', 'en', 'af', 'ar', 'zh', 'es', 'it', 'ja');
$deflang = NULL;
# Detect the language
include('languagedetection.php');
# Print the list with known languages
echo "This script supports the following languages : ";
while(list($key, $val) = each($knownlangs))
{
echo "$val ";
}
echo "
\n";
# Output the script result
echo "Your browser gave us this string to work with : $lclist
\n";
if($lang != NULL)
{
if($country)
echo "The detected language : $lang with quality $quality and the country code is $country. ($lctag)
\n";
else
echo "The detected language : $lang with quality $quality and no country is set. ($lctag)
\n";
}
else
{
echo "This script doesn't support any language that your browser knows (and $deflang == NULL).
\n";
}
?>