I\'m working with some legacy code where the original developers made heavy use of generating HTML DOM nodes with a non-standard attribute named translate
Replace the nonstandard attribute translate by an attribute like data-translate, which is virtually guaranteed to be and to remain undefined in HTML specifications and in browsers. The data-* attributes were invented to prevent issues like this, and they can also be used to fix them.