Created
January 11, 2015 14:57
-
-
Save bavington/b061f922dabbef53d75d to your computer and use it in GitHub Desktop.
Magento Local Development Translate Inline Fix
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
<!-- Add to Local.xml --> | |
<default> | |
<reference name="footer"> | |
<block type="core/text" name="translatefix"> | |
<action method="setText"> | |
<text> | |
<![CDATA[ | |
<script> | |
if(Object.__defineGetter__) | |
{ | |
var hasTranslateAttribute = function(){ | |
return $(this).hasAttribute("translate"); | |
}; | |
document.observe("dom:loaded", function() { | |
$$('*').each(function(theElement){ | |
theElement.__defineGetter__("translate", hasTranslateAttribute); | |
}); | |
}); | |
} | |
</script> | |
]]> | |
</text> | |
</action> | |
</block> | |
</reference> | |
</default> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're having local development problems with Magento 1.7, simply add this XML to your local.xml file to solve the issue with Translate Inline not working correctly.