Web translation with display replacement
First Claim
1. 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.
3 Assignments
0 Petitions
Accused Products
Abstract
Methods, systems, and apparatus, including computer program products, for translation of markup language documents with display replacement. In some implementations, a method includes displaying a markup language document in an original language by rendering an internal representation of the document, sending a data structure containing the texts from the text nodes of the internal representation, as distinct data entities, to a translation service, replacing the texts with translated texts received from the translation service resulting in a translated representation, and displaying a first translation of the document by rendering the translated representation. In some implementations, partial, incremental translation is performed. In some implementations, a method includes receiving a notification that a phrase in a markup language document has been selected, requesting translation of the text of the selected phrase, and then displaying a received translation in a user interface.
67 Citations
33 Claims
-
1. 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. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system, comprising:
- one or more computers operable to perform operations 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. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15, 16, 17)
- one or more computers operable to perform operations comprising;
-
18. A computer-implemented 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; receiving translated texts 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; determining that a first text node of the internal representation of the document in the original language was removed by an executable script of the markup language document after the data structure containing the texts was sent to the translation service; in response to determining that a first text node of the internal representation of the document in the original language was removed by an executable script of the markup language document after the data structure containing the texts was sent to the translation service, removing the first text node from the translated internal representation of the markup language document; displaying a markup language document in the different second language by rendering the translated internal representation of the markup language document. - View Dependent Claims (19, 20, 21, 22, 23, 24)
-
-
25. A system comprising:
one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations 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; receiving translated texts 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; determining that a first text node of the internal representation of the document in the original language was removed by an executable script of the markup language document after the data structure containing the texts was sent to the translation service; in response to determining that a first text node of the internal representation of the document in the original language was removed by an executable script of the markup language document after the data structure containing the texts was sent to the translation service, removing the first text node from the translated internal representation of the markup language document; displaying a markup language document in the different second language by rendering the translated internal representation of the markup language document. - View Dependent Claims (26, 27, 28, 29, 30, 31)
-
32. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations 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; receiving translated texts 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; determining that a first text node of the internal representation of the document in the original language was removed by an executable script of the markup language document after the data structure containing the texts was sent to the translation service; in response to determining that a first text node of the internal representation of the document in the original language was removed by an executable script of the markup language document after the data structure containing the texts was sent to the translation service, removing the first text node from the translated internal representation of the markup language document; displaying a markup language document in the different second language by rendering the translated internal representation of the markup language document.
-
-
33. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations 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.
-
Specification