Skip to content

Instantly share code, notes, and snippets.

@bavington
Created January 11, 2015 14:57
Show Gist options
  • Select an option

  • Save bavington/b061f922dabbef53d75d to your computer and use it in GitHub Desktop.

Select an option

Save bavington/b061f922dabbef53d75d to your computer and use it in GitHub Desktop.
Magento Local Development Translate Inline Fix
<!-- 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>
@bavington
Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment