Hi,
I have a multilingual website with three languages. I use a form with checkboxes to switch between languages. There is no "submit" button, the language switches when the user clicks on one of the three checkboxes. This works great in FF but does not work in IE7. This is the first time I am trying to do this so I am not sure where the problem is.
this is the php script used for language switching. not sure if this is important for this issue or not, but i thought i include it:<div class="language">
<form action="">
<fieldset>
<ul>
<li class="active"><a class="english" href="<?php echo switchLanguage('en') ?>" title="English" ><input type="checkbox" checked="checked"/><span>English</span></a></li>
<li><a class="china" href="<?php echo switchLanguage('ch') ?>" title="Chinese"><input type="checkbox" /><span>Chinese</span></a></li>
<li><a class="spanish" href="<?php echo switchLanguage('es') ?>" title="Spanish"><input type="checkbox" /><span>Espaņol</span></a></li>
</ul>
</fieldset>
</form>
</div>
I appreciate any help!<?php
function switchLanguage($language_code){
$uri = explode('?',$_SERVER['REQUEST_URI']);
$uri = array_slice(explode('/',$uri[0]),1);
if($uri[0]=='de' || $uri[0]=='en')
array_shift($uri);
array_unshift($uri,$language_code);
return '/'.implode('/',$uri);
}
?>
thank you







Bookmarks