multi domain & language
Posted: Wed Jun 18, 2014 5:11 am
Can someone help me with this script...?
<?php
$lang = JFactory::getLanguage();
$result=$lang->getTag();
if ($result=='en-GB'){allang = '<img src="English.jpg">';}
if ($result=='vi-VN'){allang = '<img src="TiengViet.jpg">';
else {allang = '<img src="other.jpg">';}
$host = $_SERVER['HTTP_HOST'];
if($host == 'www.domain1.org' or $host == 'domain1.org') {$text = allang;}
if($host == 'www.domain2.net' or $host == 'domain2.net') {$text = 'Not Using';}
echo $text;
?>
If English, it will display English image.
If Vietnamese, it will display Vietnamese image.
But only display on the domain that I want to.
Because I want to use one module for multi domains...
<?php
$lang = JFactory::getLanguage();
$result=$lang->getTag();
if ($result=='en-GB'){allang = '<img src="English.jpg">';}
if ($result=='vi-VN'){allang = '<img src="TiengViet.jpg">';
else {allang = '<img src="other.jpg">';}
$host = $_SERVER['HTTP_HOST'];
if($host == 'www.domain1.org' or $host == 'domain1.org') {$text = allang;}
if($host == 'www.domain2.net' or $host == 'domain2.net') {$text = 'Not Using';}
echo $text;
?>
If English, it will display English image.
If Vietnamese, it will display Vietnamese image.
But only display on the domain that I want to.
Because I want to use one module for multi domains...