I have this piece of code inside


<div id="poboxmessage" style="display: none; color: red;">address</div>

I am trying to display this div inside this file at the bottom which is working fine on English page but not getting translated to french.



I have put the translation of english to french inside



Also the translation in



I am able to display text only in English on both english and french pages the issue is just my text is not getting translated some how. I am still trying to figure out if I have missed any steps. Any advice or suggestion would help me thanks

1 Answer 1


I was misinterpreting that my div returns a string in block inside mage functionality rather it needs to be converted to block first and then into plain text. $.mage returns just a string while (__) is function which takes of translation putting whole chunk of document.getElementById('poboxmessage').style.display inside $.mage function would not understand anything and returns just a string block

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.