app/etc/modules/Package_Widget.xml
xml version="1.0"?>
<config>
<modules>
<Package_Widget>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Widget/>
</depends>
</Package_Widget>
</modules>
</config>
app/code/local/Package/Widget/etc/config.xml
xml version="1.0" encoding="utf-8"?>
<config>
<modules>
<Package_Widget>
<version>0.1.0</version>
</Package_Widget>
</modules>
<global>
<models>
<widget>
<rewrite>
<template_filter>Package_Widget_Model_Template_Filter</template_filter>
</rewrite>
</widget>
</models>
</global>
</config>
app/code/local/Package/Widget/Model/Template/Filter.php
class Package_Widget_Model_Template_Filter extends Mage_Widget_Model_Template_Filter
{
/**
* Directive for translating tex using current locale
* Supported options:
* text - text to translate
*
* @param array $construction
* @return string
*/
public function translateDirective($construction)
{
$params = $this->_getIncludeParameters($construction[2]);
$text = $params['text'];
return Mage::helper('core')->__($text);
}
}
copy app/code/core/Mage/Core/Model/Email/Template/Filter.php to
app/code/local/Mage/Core/Model/Email/Template/Filter.php
and paste the code below mediaDirective()
/**
* Directive for translating tex using current locale
* Supported options:
* text - text to translate
*
* @param array $construction
* @return string
*/
public function translateDirective($construction)
{
$params = $this->_getIncludeParameters($construction[2]);
$text = $params['text'];
return Mage::helper('core')->__($text);
}
*follow by this link: http://www.magentocommerce.com/boards%20/viewthread/206434/#t301772
0 comments:
Post a Comment