Language translation using embeddable component
First Claim
1. A method implemented by a browser executing on a client computer, the browser for interactively browsing Hypertext Markup Language (HTML) pages, the method comprising:
- obtaining, via a network, an HTML page requested by a user interacting with the browser running on the client computer to select the HTML page, the obtained HTML page containing markup elements including a first element comprising text in a first human language, the markup elements including a script element comprising a uniform resource indicator (URI) identifying a network address and a location thereat of a script provided to arbitrary client computers via the network by a network service corresponding to the network address, the script configured to, when executed, instantiate a translation component, the script not included in the HTML page when the HTML page is obtained by the browser via the network, the script further configured to, when executed, provide a displayable interactive user interface element;
processing the obtained HTML page by a renderer of the browser, the browser generating a document object model (DOM) of the HTML page by parsing the elements of the obtained HTML page, wherein the renderer produces a rendering of the HTML page according to DOM, the rendering comprising the text in the first human language;
displaying the rendering of the HTML page, including the text in the first human language, on a display of the client computer;
the processing including responding, by the renderer, to finding the script element in the obtained HTML page by using the URI therein to load the script from the network service, wherein responsive to loading the script the script is executed by the browser in a browser context comprising the DOM, and wherein the executing the script provides an instance of the translation component;
displaying, by the browser, an instance of the interactive user interface element provided by the script executing in the context;
while the rendering is being displayed, displaying the instance of the interactive user interface element by;
responding to a user input directed to the displayed instance of the interactive user interface element by;
extracting from the DOM, by the instance of the translation component executing in the context, the text in the first human language;
determining, by the instance of the translation component, a target human language;
sending, by the instance of the translation component, a request comprising an indication of the target human language and the extracted text via the network to a translation service;
receiving, by the instance of the translation component, from the translation service, translated text comprising a translation of the sent extracted text in the target language, the translation having been generated by the translation service responsive to the request and according to the indication of the target human language therein, the translation service available to perform translations for the arbitrary client computers;
refreshing the rendering of the obtained HTML page by replacing the text in the first human language with the received translated text; and
displaying the refreshed rendering of the obtained HTML page.
2 Assignments
0 Petitions
Accused Products
Abstract
Aspects of the subject matter described herein relate to language translation. In aspects, a reference to a language translation component is embedded or otherwise inserted into a Web page. When the Web page is rendered, code corresponding to the language translation component may be downloaded and executed. Once executed, the translation component may access other content in the Web page and allow a user to request translation of the Web page. Upon receiving an indication that translation is desired, the translation component may send content in the Web page to a translation service and receive translated content. The translation component may then provide this translated content to a user viewing the Web page.
55 Citations
5 Claims
-
1. A method implemented by a browser executing on a client computer, the browser for interactively browsing Hypertext Markup Language (HTML) pages, the method comprising:
-
obtaining, via a network, an HTML page requested by a user interacting with the browser running on the client computer to select the HTML page, the obtained HTML page containing markup elements including a first element comprising text in a first human language, the markup elements including a script element comprising a uniform resource indicator (URI) identifying a network address and a location thereat of a script provided to arbitrary client computers via the network by a network service corresponding to the network address, the script configured to, when executed, instantiate a translation component, the script not included in the HTML page when the HTML page is obtained by the browser via the network, the script further configured to, when executed, provide a displayable interactive user interface element; processing the obtained HTML page by a renderer of the browser, the browser generating a document object model (DOM) of the HTML page by parsing the elements of the obtained HTML page, wherein the renderer produces a rendering of the HTML page according to DOM, the rendering comprising the text in the first human language; displaying the rendering of the HTML page, including the text in the first human language, on a display of the client computer; the processing including responding, by the renderer, to finding the script element in the obtained HTML page by using the URI therein to load the script from the network service, wherein responsive to loading the script the script is executed by the browser in a browser context comprising the DOM, and wherein the executing the script provides an instance of the translation component; displaying, by the browser, an instance of the interactive user interface element provided by the script executing in the context; while the rendering is being displayed, displaying the instance of the interactive user interface element by; responding to a user input directed to the displayed instance of the interactive user interface element by; extracting from the DOM, by the instance of the translation component executing in the context, the text in the first human language; determining, by the instance of the translation component, a target human language; sending, by the instance of the translation component, a request comprising an indication of the target human language and the extracted text via the network to a translation service; receiving, by the instance of the translation component, from the translation service, translated text comprising a translation of the sent extracted text in the target language, the translation having been generated by the translation service responsive to the request and according to the indication of the target human language therein, the translation service available to perform translations for the arbitrary client computers; refreshing the rendering of the obtained HTML page by replacing the text in the first human language with the received translated text; and displaying the refreshed rendering of the obtained HTML page. - View Dependent Claims (2, 3)
-
-
4. A method performed by a browser running on a client computer comprising a display, a processor, and storage, the method performed by the browser comprising:
-
receiving, via a network, a markup page at the browser responsive to selection of the markup page by a user of the browser, the markup page comprising;
a first markup element comprising text in a first human language and comprising an indication that the text is for display, and a second element comprising a network address of a network service that provides a script and a location of the script at the network address;displaying a rendering of the markup page on the display, the displaying including generating a document object model (DOM) comprised of the text in the first human language, the displayed rendering of the markup page including a rendering of the text in the first human language rendered according to the DOM; while processing the page by the browser, responsive to detecting the second element, obtaining the script via the network from the network service using the network address and the location as obtained from the second element; executing the script by the browser in a context of the browser that comprises the DOM, the executing causing the browser to include in the displayed rendering a language selector user interface element comprising user-selectable indications of respective target languages; responding, by the script, to a user interaction with the language selector that selects one of the indications that represents a selected target language from among the target languages, by generating a request, the request comprising an indication of the selected target language and the text in the first human language, the text in the first human language extracted from the DOM by the script executing in the context; in further response to the user interaction, transmitting, by the script, via the network, the request comprising the indication of the selected target language and the text extracted by the script from the DOM, to a translation server, and in response receiving from the translation server translated text comprising a translation of the text in the selected target language, the translation server having generated the translated text by translating the text from the request according to the indication in the request, the translated text including HTML tags added by the translation server; responsive to receiving the translated text, updating the DOM by the script replacing therein the text in the first human language with the received translated text; refreshing the rendering according to the updated DOM; and displaying the refreshed rendering including the translated text on the display. - View Dependent Claims (5)
-
Specification