$countries = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Country', 'name'); echo '';
$userCountry = getUserCountry(); // Get the user's preferred country from their account settings $localizedCountries = array('US', 'CA', 'GB', 'AU'); // Array of ISO country codes for localized versions of the site if (in_array($userCountry, $localizedCountries)) { // Show the localized version of the website include('header-' . $userCountry . '.php'); } else { // Show the default version of the website include('header.php'); }Package library: CiviCRM