Skip to content

Instantly share code, notes, and snippets.

@imsamthomas
Last active August 29, 2015 14:12
Show Gist options
  • Select an option

  • Save imsamthomas/86208600d887db245778 to your computer and use it in GitHub Desktop.

Select an option

Save imsamthomas/86208600d887db245778 to your computer and use it in GitHub Desktop.
//File: /app/code/core/Mage/Core/Model/Translate/Inline.php:273
//Add follow this block
new TranslateInline('translate-inline-trig', '<?php echo $ajaxUrl ?>', '<?php
echo Mage::getDesign()->getArea() ?>');
if(Object.__defineGetter__)
{
var hasTranslateAttribute = function(){
return $(this).hasAttribute("translate");
};
document.observe("dom:loaded", function() {
$$('*').each(function(theElement){
theElement.__defineGetter__("translate", hasTranslateAttribute);
});
});
}
//Visit https://magegiant.com/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment