Magento“忘记密码”电子邮件发送错误的语言 [英] Magento "Forgot Password" email sent in wrong language

查看:271
本文介绍了Magento“忘记密码”电子邮件发送错误的语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Magento网站有多种语言。我已经设置了语言包,一切似乎在网站上正确地翻译。此外,事务性电子邮件也将以德国忘记密码电子邮件的正确语言 EXCEPT发送。这是我做的:




  • 已安装的语言包,并确保所有模板和文件夹结构都正确。示例: / app / locale / nl_NL / template / email /

  • 事实上的电子邮件:我应用了模板,选择了区域设置并保存。

  • 然后我转到系统»配置»销售电子邮件,我切换到从当前配置范围下拉菜单中的每种语言,我选择了在每种语言(每个商店视图)的交易电子邮件中创建的模板。



在网上查看解决方案后,似乎其他人也遇到了这个问题,有人提到Magento正在从em/ app中找到的第一个区域设置文件夹中挑选忘记密码模板/区域/ 。在我的情况下,我有: 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



区域设置:




  • Mage_Locale_en_US

  • Locale_Mage_community_de_DE

  • Locale_Mage_community_fr_FR

  • Mage_Locale_nl_NL



正确的电子邮件模板从相应的语言发送而不是总是德语?任何帮助将不胜感激!我可以提供更多的信息。

解决方案

我在magento v1.5中也有同样的问题。经过长时间的研究,我发现了这个解决方案,并为我工作。

 此文件中的法师/客户/型号/ Customer.php 

我已经做了一些修改以下。
找到这行代码
如果(!$ storeId)
{
$ storeId = $ this-> _getWebsiteStoreId($ this-> getSendemailStoreId());
}

并替换为

$ storeId =($ storeId =='0')?$ this-> getSendemailStoreId():$ storeId;
如果($ this-> getWebsiteId()!='0'&& $ storeId =='0')
{
$ storeIds = Mage :: app() > getWebsite($这 - > getWebsiteId()) - > getStoreIds();
重置($ storeIds);
$ storeId = current($ storeIds);
}


I have a Magento site with multiple languages. I have setup the language packs and everything seems to translate properly on the website. Also the transactional e-mails are sent in the correct language EXCEPT for the "Forgot Password" e-mail which is always sent in German. Here's what I did:

  • Installed language packs and made sure all templates and folder structures are correct. Example: /app/locale/nl_NL/template/email/
  • Under System » Transactional Emails: I applied the template, chose the locale and saved.
  • Then I went to System » Configuration » Sales Emails, I switched to each language from the "Current Configuration Scope" dropdown, and I chose the templates I created in Transactional Emails for each language (each store view).

After looking around online for a solution, it seems others had this problem too and someone mentioned that Magento is picking the "Forgot Password" template from the first locale folder found in /app/locale/. In my case I had: de_DE, en_US, fr_FR, nl_NL. So It picks the template from the German de_DE pack.

NOTE: Also, in the backend under "Configuration" there's a tab on the left called "LOCALE PACKS" which only has "Locale de_DE" under it, even though I have other language packs which don't show up here. Not sure if this is relevant.

Site: http://site1.cp1.glimworm.com/magento/

Magento Community version: 1.7.0.2

Locale packs:

  • Mage_Locale_en_US
  • Locale_Mage_community_de_DE
  • Locale_Mage_community_fr_FR
  • Mage_Locale_nl_NL

Any idea how I can get the correct email template from the corresponding language to be sent as opposed to always German? Any help will be greatly appreciated! I can provide more info as well.

解决方案

I have same problem in magento v1.5. After a long research i found this solution and its working for me.

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);
}

这篇关于Magento“忘记密码”电子邮件发送错误的语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆