I have a query related to localization of Chrome extensions. I am trying to localize the text in a button in a popup html file in my extension. The code I am using is as follows:
<button name="buttonSave" id="buttonSave" style="width: 100px; float: right;">
<label class="buttonTextStyle">
</label>
</button>
The javascript code is as follows:
document.getElementById("buttonSave").innerText = chrome.i18n.getMessage("SaveButton");
I have tried using innerText, innerHTML, value but the text in the button is not applied. Am I doing something wrong here?