博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
magento 多语言
阅读量:4199 次
发布时间:2019-05-26

本文共 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/

你可能感兴趣的文章
Linux下安装MySql(版本5.5以上)
查看>>
Virtualbox中Linux添加一个新磁盘
查看>>
胜景之地
查看>>
jar 独立运行文件制作(于windows平台)
查看>>
使用selenium动态爬取
查看>>
在SAS中进行关联规则分析
查看>>
互联网金融产品如何利用大数据做风控
查看>>
数据库基础问答Q&A
查看>>
DeepCopy
查看>>
R语言问题——连接数据库乱码问题解决方案
查看>>
json读取+对象转换+csv读写
查看>>
加密算法比较3DES AES RSA ECC MD5 SHA1等
查看>>
[Python]Anaconda(python数据分析工具箱版)安装
查看>>
CentOS安装glibc-2.14
查看>>
Hadoop FS Shell Command
查看>>
Eclipse版本查看
查看>>
Linux下安装MySql(多实例+主备)
查看>>
检测远程端口是否打开
查看>>
curl operate elasticsearch
查看>>
kibana做图表无法选取需要选的字段
查看>>