I don't think you want to do "header.textContent = ... localize", you only want to call localize on the element.