本文共 578 字,大约阅读时间需要 1 分钟。
1
system-->manager stores,添加store
2
添加index.php文件
3.
system-->configuration 添加
web 设置网站路径
4
index manager
5
在网站头部添加语言转码代码
page/switch/languages.phtml
<?php foreach ($this->getStores() as $_lang): ?>
<?php if($_lang->getId()!=$this->getCurrentStoreId()): ?> <li class="language-<?php echo $this->htmlEscape($_lang->getCode()); ?>"> <a href="<?php $url = $_lang->getCurrentUrl(); $gotourl = ""; if(strstr($url,"?")){ $gotourl = substr($url,0,strpos($url,"?")); } if($gotourl!=""){ echo $gotourl; }else{ echo $url; } ?>"><?php echo $this->htmlEscape($_lang->getName()) ?></a> </li>转载地址:http://rxbli.baihongyu.com/