Forum Moderators: coopster
<?php
$activedomain = $_SERVER['HTTP_HOST'];
$tld = substr(strrchr($activedomain,'.'),1);
// Echo it to check
echo $tld;
// Statements to require the language files depending on the top level domain
switch ($tld)
{
case 'uk':
require ('en-uk.php');
break;
case 'de':
require ('de.php');
break;
default:
require ('en-us.php');
}
?>