MB_Translate - Version 0.1.1

Version Notes

Stable version

Download this release

Release Info

Developer Miguel Balparda
Extension MB_Translate
Version 0.1.1
Comparing to
See all releases


Version 0.1.1

app/code/local/MB/Translate/Helper/Data.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MB_Translate_Helper_Data extends Mage_Core_Helper_Abstract
4
+ {
5
+
6
+ }
app/code/local/MB/Translate/Model/Template/Filter.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MB_Translate_Model_Template_Filter extends Mage_Widget_Model_Template_Filter
4
+ {
5
+ public function translateDirective($construction)
6
+ {
7
+ $params = $this->_getIncludeParameters($construction[2]);
8
+ $text = $params['text'];
9
+ return Mage::helper('page')->__($text);
10
+ }
11
+ }
app/code/local/MB/Translate/etc/config.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MB_Translate>
5
+ <version>0.1.1</version>
6
+ </MB_Translate>
7
+ </modules>
8
+ <frontend>
9
+ <routers>
10
+ <web>
11
+ <use>standard</use>
12
+ <args>
13
+ <module>Company_Web</module>
14
+ <frontName>web</frontName>
15
+ </args>
16
+ </web>
17
+ </routers>
18
+ <layout>
19
+ <updates>
20
+ <web>
21
+ <file>web.xml</file>
22
+ </web>
23
+ </updates>
24
+ </layout>
25
+ </frontend>
26
+ <global>
27
+ <models>
28
+ <widget>
29
+ <rewrite>
30
+ <template_filter>MB_Translate_Model_Template_Filter</template_filter>
31
+ </rewrite>
32
+ </widget>
33
+ </models>
34
+ <helpers>
35
+ <mb_translate>
36
+ <class>MB_Translate_Helper</class>
37
+ </mb_translate>
38
+ </helpers>
39
+ </global>
40
+ </config>
app/etc/modules/MB_Translate.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <MB_Translate>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </MB_Translate>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>MB_Translate</name>
4
+ <version>0.1.1</version>
5
+ <stability>stable</stability>
6
+ <license>public</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>CMS/Block translation</summary>
10
+ <description>Translate CMS Pages in Magento.&#xD;
11
+ &#xD;
12
+ Use: In any CMS Page or Block use {{translate text="Text here"}} and the text will be translatable with the Inline translator.</description>
13
+ <notes>Stable version</notes>
14
+ <authors><author><name>Miguel Balparda</name><user>miguel_balparda</user><email>development@starton.com.ar</email></author></authors>
15
+ <date>2014-02-08</date>
16
+ <time>12:40:30</time>
17
+ <contents><target name="magelocal"><dir name="MB"><dir name="Translate"><dir name="Helper"><file name="Data.php" hash="409e62fecab96df8ec3dcd2325b0153d"/></dir><dir name="Model"><dir name="Template"><file name="Filter.php" hash="ca359bc2b8eb8bfaab4b70aef49fec84"/></dir></dir><dir name="etc"><file name="config.xml" hash="8b648fc0c9b3dbd3f5691c48cc77fee5"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MB_Translate.xml" hash="40250a1c1920ae3450fcc56c91df1c20"/></dir></target></contents>
18
+ <compatible/>
19
+ <dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
20
+ </package>