CN114791987A - Webpage translation method and related equipment - Google Patents

Webpage translation method and related equipment Download PDF

Info

Publication number
CN114791987A
CN114791987A CN202210434967.5A CN202210434967A CN114791987A CN 114791987 A CN114791987 A CN 114791987A CN 202210434967 A CN202210434967 A CN 202210434967A CN 114791987 A CN114791987 A CN 114791987A
Authority
CN
China
Prior art keywords
translation
translated
text
page
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210434967.5A
Other languages
Chinese (zh)
Inventor
刘波
谷超
刘帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bestseller Shenzhen Technology Co ltd
Original Assignee
Bestseller Shenzhen Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bestseller Shenzhen Technology Co ltd filed Critical Bestseller Shenzhen Technology Co ltd
Priority to CN202210434967.5A priority Critical patent/CN114791987A/en
Publication of CN114791987A publication Critical patent/CN114791987A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/40Processing or translation of natural language
    • G06F40/58Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation

Abstract

The invention discloses a webpage translation method and related equipment, wherein the method comprises the steps of acquiring webpage information to be translated and translation information; determining pages to be translated and texts to be translated corresponding to the pages to be translated according to the webpage information; translating the text to be translated according to the translation information to obtain a first translation text corresponding to the page to be translated; for each page to be translated, determining target translation data corresponding to the first translation text for the plate information of the translation page; and when a language switching instruction of the client aiming at the page to be translated is detected, sending the target translation data to the client according to the target translation data to replace the text to be translated of the page to be translated to obtain a translated page. The invention ensures that the display effects before and after translation are close, reduces the splitting sense of a browser in the switching process and is more convenient in the correction process.

Description

Webpage translation method and related equipment
Technical Field
The invention relates to the technical field of internet, in particular to a webpage translation method and related equipment.
Background
With the development of the internet and the internationalization of trade, more and more network users need to inquire or browse websites of other countries or even websites of different languages issued by themselves when browsing webpages. Under the condition that a user does not have multi-language processing capability, the website content needs to be locally processed when the user wants to read the content of the webpage without obstacles. Localization of web site content is largely dependent on third party applications. The existing translation application or plug-in is mainly used for sequencing and translating all pages and page texts in a website through a list. And displaying images and contents contained in the website in a background table form after the translation.
The translation mode can change the typesetting and layout of the original website page, so that when a user browses after translating, the translated content can be split, the information cannot be associated with the actual page layout and the content, and the information acquisition is fragmented. And if the publisher needs to proofread the translated content subsequently, the difficulty is higher.
Disclosure of Invention
The invention provides a webpage translation method and related equipment aiming at the defects of the prior art.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
a method of web page translation, the method comprising:
acquiring webpage information to be translated and translation information, wherein the translation information comprises a source language type and a target language type;
determining pages to be translated and texts to be translated corresponding to the pages to be translated according to the webpage information;
translating the text to be translated according to the translation information to obtain a first translation text corresponding to the page to be translated;
for each page to be translated, determining target translation data corresponding to the first translation text for the plate information of the translation page;
and when a language switching instruction of the client aiming at the page to be translated is detected, sending the target translation data to the client according to the target translation data to replace the text to be translated of the page to be translated to obtain a translated page.
The webpage translation method comprises the following steps that before determining the pages to be translated and the texts to be translated corresponding to the pages to be translated according to the webpage information, the method further comprises the following steps:
judging whether the webpage information is a webpage with a text capable of being grabbed or not according to a main domain name address in the webpage information;
if so, generating and displaying a translation button;
if not, displaying the preset first prompt information.
The webpage translation method, wherein the translating the text to be translated according to the translation information to obtain a first translation text corresponding to the page to be translated comprises the following steps:
according to the hierarchical relation of the pages to be translated, taking each page to be translated as a node, and generating a tree-shaped website map corresponding to the webpage information;
and for each node, when a translation instruction for the node is detected, translating the text to be translated corresponding to the node according to the translation information to obtain a first translation text.
The webpage translation method comprises the step of enabling the tree-shaped website map to comprise translation labels corresponding to the nodes, wherein the translation labels comprise untranslated labels, translated labels and/or translated labels.
The webpage translation method, wherein before the translation is performed on the text to be translated corresponding to the node according to the translation information to obtain the first translation text, the method further comprises the following steps:
judging whether the text quantity of the text to be translated is smaller than or equal to a preset text quantity threshold value or not;
if so, translating the text to be translated corresponding to the node according to the translation information to obtain a first translation text;
and if not, displaying a preset second prompt message.
The webpage translation method, wherein the translating the text to be translated corresponding to the node according to the translation information to obtain a first translation text comprises the following steps:
performing field matching on the text to be translated and a plurality of groups of standard translations in a preset corpus to obtain matched fields and unmatched fields in the translated text;
sending the unmatched field to a preset translation platform, and controlling the translation platform to translate the unmatched field to obtain a third translation text;
combining the matching field with the third translation text to obtain a fourth translation text;
and taking the fourth translation text as the first translation text.
The webpage translation method includes that each translation page includes a plurality of plates, the plate information includes plate font parameters, and determining target translation data corresponding to the first translation text for each page to be translated and for the plate information of the translation page includes:
aiming at each plate, determining an initial font parameter of a first translation text corresponding to the plate according to the plate font parameter corresponding to the plate;
and determining target translation data corresponding to the first translation text according to the initial font parameters.
The webpage translation method, wherein the determining target translation data corresponding to the first translation text according to the initial font parameters comprises:
loading the first translation text according to the initial font parameters and the display parameters of the plate to obtain a correction page corresponding to the plate;
and when a page correction instruction corresponding to the correction page is detected, adjusting the initial font parameters according to the second correction instruction to obtain target translation data.
A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in the web page translation method as recited in any above.
A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps of the web page translation method as described in any one of the above.
Has the beneficial effects that: the invention provides a webpage translation method and related equipment. Wherein the translation information includes a language type before the translation and a language type that the user wants to translate. And then determining a page to be translated and a text to be translated displayed on the page according to the webpage information. And then translating the text to be translated according to the previous translation information to obtain an initial translation text. Each translation page comprises a plurality of plates, such as a primary title, a secondary title and a text, and then target translation data of the first translation text is determined according to plate information displayed on the page, wherein the size of a font of the plate information in the plate, the thickness of the font, the type of the font, the position of the plate and the like. And finally, when the language is required to be switched, replacing the text to be translated on the page with the target translation data, so that the final display effect is similar to that before translation, and the split feeling of the text before and after translation for the user is reduced.
Drawings
Fig. 1 is a flowchart of a web page translation method provided by the present invention.
Fig. 2 is an overall flowchart of the web page translation method provided by the present invention.
Fig. 3 is a schematic structural diagram of a terminal device provided in the present invention.
Detailed Description
The present invention provides a web page translation method, and in order to make the objects, technical solutions, and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
As shown in fig. 1, the present embodiment provides a web page translation method, which is described by taking a common server as an execution subject for convenience of description, where the server may be replaced by a tablet, a computer, or other devices with data processing functions. In the embodiment, a page accessed by a client to a server is used as a webpage display mode after translation, the server is provided with a translation management platform, a multi-language background, a text translation platform and the like, and the platforms perform interaction and data processing to complete webpage translation and display. The naming of these platforms is only based on their functions, and there is no need to have a real object of the platform, and it is sufficient that the platforms have the same or similar functions. The webpage translation method comprises the following steps:
and S10, acquiring the webpage information to be translated and the translation information.
Specifically, the website address includes a main domain name of the website, a sub domain name or a web page address under the main domain name, and the like. The translation information includes a source language type and a target language type. For example, if a website a is to be translated from chinese to english, the website address is website a, the source language type is chinese, and the target language type is english.
As shown in fig. 2, a user may create a translation project on the translation management platform, and input a website address and corresponding translation information as information of the translation project.
S20, determining the page to be translated and the text to be translated corresponding to each page to be translated according to the webpage information.
Specifically, when the web page information is a single web page address, a page corresponding to the web page address may be used as a page to be translated, and text content on the page to be translated may be used as a text to be translated.
When the web page information is a main domain name or a sub-domain name under the main domain name, or a plurality of web page addresses, not every web page address can be translated. Some pages have contents that are pictures, and there are no contents that can be edited and translated, and at this time, capturing such a page for translation cannot obtain a translation result, and therefore, for such a page, the following steps are performed before translation in this embodiment:
b10, scanning each web page address in the web page information, and judging whether the page corresponding to the web page address is a page capable of capturing texts.
Specifically, a plurality of web addresses exist under the flags of the main domain name and the sub domain name in the web page information, so that each web address in the web page information is scanned to capture text content corresponding to each web address, and whether a page corresponding to the web address is a page capable of capturing text is determined.
And B20, if yes, determining that the page corresponding to the web page address is a page to be translated, and taking the text content of the page to be translated as a text to be translated.
Specifically, if the text content can be captured, it is indicated that the page corresponding to the web page address is a page where the text can be captured. Therefore, the page is taken as a page to be translated, and the text content of the translated page is taken as a text to be translated.
If the text cannot be captured, the translation button is not generated and displayed, and the first prompt message is displayed to tell the user that the page cannot be translated, so that invalid translation is avoided.
S30, translating the text to be translated according to the translation information to obtain a first translation text corresponding to the page to be translated.
Specifically, after the page to be translated and the text to be translated are obtained, if the number of the page to be translated and the number of the text to be translated are one, the text to be translated can be directly translated according to the translation information, so that a first translation text corresponding to the page to be translated is obtained.
However, when the main domain name of the web page contains a plurality of sub-domain names or the types of the web page are many, not all addresses under the main domain name of the web page need to be translated, such as a web page displaying a service agreement. In order to facilitate the user to filter the page which does not need to be translated, the scheme adopts a mode of visualizing a plurality of addresses under the domain name of the page. The process is as follows:
and A10, taking each page to be translated as a node according to the hierarchical relationship of the pages to be translated, and generating a tree-shaped website map corresponding to the webpage information.
Specifically, a main domain name can be used as an entry, and all accessible page addresses under the domain name are captured and a list is generated. And classifying the web page addresses according to the acquired web page addresses and the hierarchical relation, such as a first-level domain name, a second-level domain name and a third-level domain name. And finally, generating a tree-shaped website map corresponding to the webpage information by taking each page to be translated as a node according to the hierarchical relationship through the classified webpage addresses.
In addition, the tree-shaped website map comprises translation tags corresponding to each node, and the translation tags comprise untranslated tags, translated tags and/or tags in translation. Therefore, before, during and after the translation process, the user can quickly determine the translation progress of each page and can better manage the translation progress.
And A20, aiming at each node, when a translation instruction aiming at the node is detected, translating the text to be translated corresponding to the node according to the translation information to obtain a first translation text.
Specifically, after the tree-shaped website map is obtained, the user can select the page needing to be translated and the page not needing to be translated from the pages to be translated by himself. When a user needs to translate a certain page to be translated, the node corresponding to the page to be translated can be selected, and a translation instruction is input. And subsequently, translating the text to be translated corresponding to the node according to the information to be translated to obtain a first translation text.
By adopting the visual mode, the user can quickly find the page needing to be translated and the page not needed on the tree-shaped website map, thereby improving the effectiveness of translation. And the method can also translate the pages which are considered to be the most important by self first, and adjust the translation sequence.
As more content is translated, the more easily the translation problem accumulates. Therefore, in the present embodiment, a text number threshold is set in advance. Judging whether the text quantity of the text to be translated is less than or equal to a preset text quantity threshold value or not; if so, translating the text to be translated corresponding to the node according to the translation information to obtain a first translation text; if not, displaying a preset second prompt message.
There are words that have different translations in different domains. In order to improve the accuracy of translation, a corpus used for storing standard translations can be set in advance, and the accuracy of translation is improved by using the corpus. The process is as follows:
and A21, carrying out field matching on the text to be translated and a plurality of groups of standard translations in a preset corpus to obtain a matching field and an unmatched field in the translation text.
Specifically, the preset corpus includes several sets of standard translations. For example, the word "tips" is used as a "tip" and an abbreviation of transjugular intrahepatic portosystemic shunt (transjugular intrahepatic portosystemic shunt), and if the user wants to translate english from chinese and the web page relates to a procedure such as "tips-transjugular intrahepatic portosystemic shunt" as a set of standard translations can be set in the corpus in advance.
And performing field matching on the text to be translated and the standard translation in the corpus to obtain a matched field and an unmatched field in the translated text. Taking the above tips as an example, the tips in the text to be translated are the matching fields, and the other texts to be translated are the unmatched fields.
In setting the standard translation, the user may also choose whether to recognize the capital or lowercase, for example, in capitalization for the letters of the general abbreviation, so that when the pair of standard words "TIPS" and "transjugular intrahepatic portosystemic shunt" is set, the capital recognition is limited, and the "TIPS" representing the lesser poster is not misinterpreted as "transjugular intrahepatic portosystemic shunt".
In contrast, standard translations also include a special type, i.e., the words before and after translation are the same. For example, the user considers "TIPS" as a common medical term, and the reader browsing the page should understand or relatively easily understand the meaning of "TIPS", and does not need to translate it into a longer chinese language, and can set the translated word corresponding to "TIPS" in the standard translation as "TIPS".
After selecting the rule, the merchant inputs the original text A, whether the case is recognized is checked, and all the texts will not be translated on the merchant website after being stored.
And A22, sending the text to be translated to a preset translation platform, and controlling the translation platform to translate the text to be translated to obtain a second translation text.
Specifically, a translation platform is preset, and the translation platform can be installed inside a server and can also be an interface of a third-party translation application. And sending the text to be translated to a translation platform, and controlling the translation platform to translate the text to be translated to obtain a second translation text. The translation platform can adopt the existing translation algorithm, translation model and the like, such as Google neural network.
And A23, combining the matching field and the second translation text to obtain a fourth translation text.
Specifically, the second translated text and the matching field are merged, that is, the content translated according to the general situation in the second translated text is replaced by the matching field, so as to obtain a fourth translated text adjusted by the corpus.
For example, the sentence "it is TIPS", the corresponding second translation text is "this is a small poster", and according to the matching fields, "TIPS" and "transjugular intrahepatic portosystemic bypass", it can be adjusted to "this is transjugular intrahepatic portosystemic bypass".
And A25, taking the fourth translation text as the first translation text.
Specifically, in one implementation, the fourth translated text adjusted by the corpus may be directly used as the first translated text.
This method lacks manual correction, so the subsequent error rate is higher, and therefore, in this embodiment, after the fourth translation text is obtained, a manual correction function may be added. Firstly, establishing a corresponding relation between the fourth translation text and the text to be translated to obtain a matching table, wherein the fourth translation text in the matching table can be edited. And then displaying the pairing table in front of a user, and editing the fourth translation text according to an editing instruction when the editing instruction of the fourth translation text is detected, so that the first translation text after manual correction is obtained, and the translation accuracy is improved.
On the other hand, when the standard translation is a sentence, in order to reduce unnecessary translation replacement, when a text needing translation is sent, the matching field is reserved, the unmatched field is sent to the translation platform, and the translation platform is controlled to translate the text to be translated to obtain a second translated text. And after the second translation text is obtained, combining the second translation text with the matching field to obtain a fourth translation text.
S40, for each page to be translated, and for the plate information of the page to be translated, determining target translation data corresponding to the first translation text.
Specifically, a page generally includes several tiles, as shown in fig. 2, and this exemplary page includes three tiles, i.e., a primary tile, a secondary tile, and a body, where the size, position, font of the displayed content, and the like of each tile are different. In order to improve the similarity of the translated page and the page before translation.
Taking the case that the tile information includes the tile font parameters, the process includes:
and C10, aiming at each plate, determining the initial font parameters of the first translation text corresponding to the plate according to the plate font parameters corresponding to the plate.
Specifically, for each tile, the font parameter adopted by the font in the tile, that is, the tile font parameter, is used as the initial font parameter of the first translation text corresponding to the tile. For example, the font parameters of the first-level caption are "first font, song font, bold", and the initial font parameters of the first translated text corresponding to the first-level caption are "first font, song font, bold".
And C20, determining target translation data corresponding to the first translation text according to the initial font parameters.
Specifically, after the initial parameter is obtained, the display rendering effect of the first translation text can be configured directly according to the initial parameter, so that the first translation text meeting the initial parameter is obtained and is used as the target translation data.
Some fonts are specific to some language types, for example, the font SWItalc only contains english, and if the translated text is chinese, the translated text cannot display an hour effect similar to that of the text to be translated before the translation. Further, even if the font size, the subject, and the like are the same, the text lengths before and after translation are different, and therefore, in the present embodiment, the second correction is performed in order to match the page before translation more. The process comprises the following steps:
and C21, loading the first translation text according to the initial font parameters and the display parameters of the plate, and obtaining a correction page corresponding to the plate.
Specifically, the display parameters of the plate refer to parameters such as specific position coordinates and colors of the plate. And loading the first translation text according to the first translation text, the initial font parameters and the display parameters, so that the first translation text is displayed with a display effect similar to that of the text to be translated, and a correction page corresponding to the board block is obtained.
And C22, when a page correction instruction corresponding to the corrected page is detected, adjusting the initial font parameters according to the second correction instruction to obtain target translation data.
Specifically, the content of the correction page can be directly viewed and edited by the user. The user can select the initial font parameters by himself, so that the display effect of the first translation text is close to that of the text to be translated, and the target translation data is obtained.
Further, at this correction page, the user can also correct the translated contents of the first translated text again. In order to facilitate the user to adjust the initial font parameters and the first translation text, the page to be translated may be displayed on the other side of the interface.
Unlike tabular editing of text editing, visual translated text editing can mirror the translated pages of the merchant in the background, all the translated texts on the pages can be clicked on and then edited, and meanwhile, the modified translated texts are synchronized to the correction pages, so that the positions and effects of the translated texts in the pages can be clear.
Further, types written from right to left for some translated target language type, such as arabic, hebrew, bosch, urdon, etc. Since most of the text to be translated is in the source language reading and writing order from left to right, the source language alignment and reading order is maintained when translating to Hebrew, Arabic, Uldu and Persian. This causes great inconvenience to users of these languages. Thus, the target language type is right to left type, the first translated text and layout on the page is also arranged right to left, and right aligned.
S50, when a language switching instruction of the client for the page to be translated is detected, sending target translation data corresponding to the language switching instruction to the client to replace the text to be translated of the page to be translated to obtain a translated page.
Specifically, the translated and corrected target translation data may be stored in advance. Meanwhile, after the translation is finished, a language switching control is added in each page to be translated or the page selected by the user. The language switching control can be set by a user for a plurality of language types.
When the visitor accesses the page to be translated through the client, on one hand, the visitor can select the language type which the visitor wants to select through the language switching control, and therefore the client sends a language switching instruction to the server; on the other hand, the user can set the automatic switching function, and if the user starts the automatic switching function, when the client accesses the server, the IP address of the client or the system language used by the client is used as a language switching instruction, so as to help the server to determine the language type to be automatically switched.
The language switching control can select a drop-down radio box, different language types are displayed in the radio box, and different language names are demonstrated by the languages, such as Chinese displaying 'simplified Chinese' English displaying 'English' or 2-bit letter codes displaying the languages, such as ZH and EN. In addition, the language switching control can be used for quickly setting the position of the selector on the page through the Shopefy theme expansion or CSS and the like, or the language selector is integrated into the page menu.
When a user configures a plurality of target translation data of different language types for a website page of the user, the language switching control can display the language type corresponding to the target translation data.
After determining the language type needing to be switched, the server selects target translation data corresponding to a language switching instruction and the page to be translated from a plurality of pieces of target translation data stored in advance, and sends the target translation data to the client to replace the text to be translated of the page to be translated to obtain the translated page.
Because the font format and the font size of the target translation data are equal to the display effect of the text to be translated before translation, the display effect of the page is similar before translation and after translation, and the fusion sense is stronger. Meanwhile, for a user at a background, the page display effect is similar, so that the translated text can be corrected more easily, and the correction efficiency is improved.
Based on the above webpage translation method, the present invention further provides a terminal device, as shown in fig. 3, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory) 22, and may further include a communication Interface (Communications Interface)23 and a bus 24. Wherein the processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other via a bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may invoke logic commands in the memory 22 to perform the methods in the above-described embodiments.
In addition, the logic commands in the memory 22 can be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program commands or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes functional applications and data processing, i.e. implements the methods in the above embodiments, by running software programs, commands or modules stored in the memory 22.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be used as the transient computer readable storage medium.
In addition, the specific processes loaded and executed by the plurality of command processors in the computer-readable storage medium and the terminal device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, and not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for web page translation, the method comprising:
acquiring webpage information to be translated and translation information, wherein the translation information comprises a source language type and a target language type;
determining pages to be translated and texts to be translated corresponding to the pages to be translated according to the webpage information;
translating the text to be translated according to the translation information to obtain a first translation text corresponding to the page to be translated;
for each page to be translated, determining target translation data corresponding to the first translation text for the plate information of the translation page;
and when a language switching instruction of the client aiming at the page to be translated is detected, sending the target translation data to the client according to the target translation data to replace the text to be translated of the page to be translated to obtain a translated page.
2. The web page translation method according to claim 1, wherein before determining the page to be translated and the text to be translated corresponding to each page to be translated according to the web page information, the method further comprises:
judging whether the webpage information is a webpage with a text capable of being grabbed or not according to a main domain name address in the webpage information;
if so, generating and displaying a translation button;
if not, displaying a preset first prompt message.
3. The webpage translation method according to claim 1, wherein the translating the text to be translated according to the translation information to obtain a first translation text corresponding to the page to be translated comprises:
according to the hierarchical relation of the pages to be translated, taking each page to be translated as a node, and generating a tree-shaped website map corresponding to the webpage information;
and for each node, when a translation instruction for the node is detected, translating the text to be translated corresponding to the node according to the translation information to obtain a first translation text.
4. The web page translation method according to claim 3, wherein the tree-like site map includes translation tags corresponding to each of the nodes, and the translation tags include untranslated tags, translated tags and/or tags in translation.
5. The web page translation method according to claim 3, wherein before translating the text to be translated corresponding to the node according to the translation information to obtain the first translation text, the method further comprises:
judging whether the text quantity of the text to be translated is smaller than or equal to a preset text quantity threshold value or not;
if so, translating the text to be translated corresponding to the node according to the translation information to obtain a first translation text;
and if not, displaying a preset second prompt message.
6. The web page translation method according to claim 3, wherein translating the text to be translated corresponding to the node according to the translation information to obtain a first translated text comprises:
performing field matching on the text to be translated and a plurality of groups of standard translations in a preset corpus to obtain matched fields and unmatched fields in the translated text;
sending the unmatched field to a preset translation platform, and controlling the translation platform to translate the unmatched field to obtain a third translation text;
combining the matching field with the third translation text to obtain a fourth translation text;
and taking the fourth translation text as the first translation text.
7. The method for translating web pages according to any one of claims 1 to 6, wherein each of the translated pages includes a plurality of slabs, the slab information includes slab font parameters, and the determining, for each of the pages to be translated, the target translation data corresponding to the first translated text for the slab information of the translated page includes:
aiming at each plate, determining an initial font parameter of a first translation text corresponding to the plate according to the font parameter of the plate corresponding to the plate;
and determining target translation data corresponding to the first translation text according to the initial font parameters.
8. The method for translating web pages according to claim 7, wherein the determining target translation data corresponding to the first translated text according to the initial font parameter comprises:
loading the first translation text according to the initial font parameters and the display parameters of the plate to obtain a correction page corresponding to the plate;
and when a page correction instruction corresponding to the correction page is detected, adjusting the initial font parameters according to the second correction instruction to obtain target translation data.
9. A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors for implementing the steps in the web page translation method according to any one of claims 1 to 8.
10. A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes the connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the web page translation method according to any one of claims 1 to 8.
CN202210434967.5A 2022-04-24 2022-04-24 Webpage translation method and related equipment Pending CN114791987A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210434967.5A CN114791987A (en) 2022-04-24 2022-04-24 Webpage translation method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210434967.5A CN114791987A (en) 2022-04-24 2022-04-24 Webpage translation method and related equipment

Publications (1)

Publication Number Publication Date
CN114791987A true CN114791987A (en) 2022-07-26

Family

ID=82462290

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210434967.5A Pending CN114791987A (en) 2022-04-24 2022-04-24 Webpage translation method and related equipment

Country Status (1)

Country Link
CN (1) CN114791987A (en)

Similar Documents

Publication Publication Date Title
CN109801347B (en) Method, device, equipment and medium for generating editable image template
JP4344693B2 (en) System and method for browser document editing
US20100318894A1 (en) Modifications to Editable Elements of Web Pages Rendered in Word Processor Applications
JP4051341B2 (en) Method and system for delivering dynamic information within a network
US7370274B1 (en) System and method for formatting objects on a page of an electronic document by reference
CN108170660B (en) Multi-language typesetting display method, device, browser, terminal and medium
JP2005339566A (en) Method and system for mapping content between starting template and target template
JP2014032665A (en) Selective display of ocr'ed text and corresponding images from publications on client device
JP6693582B2 (en) Document abstract generation method, device, electronic device, and computer-readable storage medium
US7793224B1 (en) Methods and apparatus for formatting identified content
US20040268256A1 (en) Program, character inputting and editing method, apparatus and storage medium
US20030237055A1 (en) Methods and systems for processing text elements
JP2015130158A (en) Cloud-based font service system
US9141867B1 (en) Determining word segment boundaries
JP2010157065A (en) Machine translation system and method of the same
CN111240790B (en) Multi-language adaptation method, device, client and storage medium for application
JP2008123234A (en) Translation server device, translation system, translation method, and translation program
US9792263B2 (en) Human input to relate separate scanned objects
JP2005322082A (en) Document attribute input device and method
CN114791987A (en) Webpage translation method and related equipment
JP5483526B2 (en) Machine translation system and machine translation method
US9946698B2 (en) Inserting text and graphics using hand markup
CN115329782A (en) Language translation method, device, electronic equipment and storage medium
JP7246795B1 (en) Information processing device, method, program, and system
JP7329281B1 (en) Information processing device, method, program, and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination