I'm trying to re-run the string replace that Magento runs upon load for language translation. The reason for this is I have injected HTML (via AJAX) that happens at any point after the page load has completed.
1 Answer
You are talking about the php one __()
or the JS one?
The PHP translation NO, because it works server side, but you can translate the stuff in the AJAX request.
The JS one is injected here:
app/design/adminhtml/default/default/template/page/js/translate.phtml
And I think if generate a second Translate
object it might work.
-
Thank you. I will try that method and if that doesn't work, I will translate the data before it gets sent in the AJAX call– SteCommented Aug 22, 2014 at 9:03