Created
September 20, 2012 19:49
-
-
Save twslade/3757953 to your computer and use it in GitHub Desktop.
Magento Translating - Very Easy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vars = array('test' => 'twinkle'); | |
$text = ' | |
I am making a {{var test}} | |
what if {{depend test2}}this{{/depend}} does not exist | |
{{if test3}}does if exists{{/if}} | |
'; | |
$template = new Varien_Filter_Template(); | |
$template->setVariables($vars); | |
var_dump($template->filter($text)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment