2013-08-29 48 views
1

在Magento 1.7消息“您的查询已提交并将尽快回复。感谢您与我们联系“,我们得到的时候默认与我们联系,成功提交所使用的覆盖Magento成功消息联系我们表格

app/code/core/Mage/Contacts/controllers/IndexController.php 

的翻译(.CSV)模块所使用的文件是:

app/locale/en_US/Mage_Contacts.csv 

我试图覆盖它: app/design/frontend/MyTheme/default/locale/en_US/translate.csv

但是到目前为止一直没有成功......我是否真的需要重写控制器操作,使用自定义模块只是为了翻译这个消息è?谢谢。

回答

0

如果您的系统一直没有核心改变,或有改变的消息无码池覆盖,或现有的改写,那么这是代码,增加了该消息

Mage::getSingleton('customer/session') 
->addSuccess(
    Mage::helper('contacts')->__('Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.') 
); 

串线

'Your inquiry was submitted and will be responded to as soon as possible. Thank you for contacting us.' 

通过__翻译/本地化函数,这意味着文本可以通过Magento的CSV和内联翻译功能进行更改。

这个Magento Stack Exchange question about the translation feature可能会帮助您调试您当前的系统,并解释为什么翻译不能按照您认为应该的方式工作。 (因为你的问题没有提到它,我的猜测是缓存)