Gli*_*orm 4 email multilingual magento forgot-password magento-1.7
我有一个Magento网站,有多种语言.我已经设置了语言包,一切似乎都在网站上正确翻译.此外,交易电子邮件以正确的语言发送,除了" 忘记密码 "电子邮件,该电子邮件始终以德语发送.这是我做的:
/app/locale/nl_NL/template/email/
在网上寻找解决方案后,似乎其他人也遇到了这个问题,有人提到Magento正在从/ app/locale /中找到的第一个语言环境文件夹中选择"忘记密码"模板.在我来说,我有:de_DE
,en_US
,fr_FR
,nl_NL
.所以它从德国de_DE
包中挑选模板.
注意:此外,在"配置"下的后端,左侧有一个名为"LOCALE PACKS"的选项卡,其下只有"Locale de_DE",即使我有其他语言包没有显示在这里.不确定这是否相关.
网站:http://site1.cp1.glimworm.com/magento/
Magento社区版本:1.7.0.2
区域包:
知道如何从相应的语言中获取正确的电子邮件模板,而不是总是德语?任何帮助将不胜感激!我也可以提供更多信息.
小智 5
我在magento v1.5中遇到同样的问题.经过长时间的研究,我找到了这个解决方案,并为我工作.
Mage/Customer/Model/Customer.php
in this file i have make some changes as following.
find this line of code
if (!$storeId)
{
$storeId = $this->_getWebsiteStoreId($this->getSendemailStoreId());
}
and replace with
$storeId = ($storeId == '0')?$this->getSendemailStoreId():$storeId;
if ($this->getWebsiteId() != '0' && $storeId == '0')
{
$storeIds = Mage::app()->getWebsite($this->getWebsiteId())->getStoreIds();
reset($storeIds);
$storeId = current($storeIds);
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5133 次 |
最近记录: |