Patent ID: 8683329

Claim:
A method, comprising: receiving a markup language document in an original language; generating an internal representation of the document, the representation including nodes, the nodes including one or more text nodes and one or more non-text nodes, the text nodes each including respective original text; and sending a data structure containing the texts from the text nodes, as distinct data entities, to a translation service and replacing the texts in the text nodes with corresponding translated texts received from the translation service to generate a first translated internal representation of the markup language document, wherein the original texts in the text nodes are in the original language and the translated texts are in a different second language; displaying a markup language document in the different second language by rendering the first translated internal representation of the document; determining that an executable script of the markup language document has replaced first text in a first text node with new text in the original language; in response to determining that the executable script of the markup language document has replaced first text in the first text node with new text in the original language, sending a data structure containing the new text to the translation service and receiving, from the translation service, first translated text for the first text node in the second language; replacing the text in the first text node with the first translated text in the second language to generate a second translated internal representation of the document; and displaying a markup language document in the different second language by rendering the second translated internal representation of the markup language document.