CN114168251A - Language switching method, device, equipment, computer readable storage medium and product - Google Patents

Language switching method, device, equipment, computer readable storage medium and product Download PDF

Info

Publication number
CN114168251A
CN114168251A CN202210131854.8A CN202210131854A CN114168251A CN 114168251 A CN114168251 A CN 114168251A CN 202210131854 A CN202210131854 A CN 202210131854A CN 114168251 A CN114168251 A CN 114168251A
Authority
CN
China
Prior art keywords
language
entry
target
resource server
user
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
CN202210131854.8A
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.)
Longcheer Electronics Huizhou Co Ltd
Original Assignee
Longcheer Electronics Huizhou 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 Longcheer Electronics Huizhou Co Ltd filed Critical Longcheer Electronics Huizhou Co Ltd
Priority to CN202210131854.8A priority Critical patent/CN114168251A/en
Publication of CN114168251A publication Critical patent/CN114168251A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation
    • 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 present disclosure provides a language switching method, apparatus, device, computer-readable storage medium and product, the method comprising: acquiring a language switching request; acquiring a to-be-translated entry of any language pre-stored in the terminal equipment according to the language switching request, and sending the to-be-translated entry and the target language identifier to an online translation engine; sending the target language identification to a preset resource server according to the language switching request; respectively acquiring a processed entry sent by an online translation engine and a target word stock corresponding to a target language identifier sent by a resource server; and switching the languages used by the terminal equipment according to the processed entries and the target word stock. By translating the entry to be translated on line and acquiring the target word stock on line, the memory required by language switching is effectively reduced. In addition, the online translation speed is high, the language switching request of the user can be quickly responded, the language switching efficiency is improved, and the user experience is optimized.

Description

Language switching method, device, equipment, computer readable storage medium and product
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a method, an apparatus, a device, a computer-readable storage medium, and a product for language switching.
Background
When the user uses the terminal equipment, different languages can be selected for display according to actual requirements due to different languages used by the user.
In order to implement the language switching display, the conventional processing device generally configures multilingual translation resources and word stock resources in the terminal device, and selects translation resources and word stock resources of a corresponding language to display when a user needs to switch languages. When a new language needs to be added, the vocabulary entry needs to be translated manually, and new translation resources and word stock resources are reloaded into the terminal equipment.
However, the above devices often occupy a large memory for language switching operation. And when the language needs to be updated, the updating period is often long, and the requirement of the user for language switching cannot be met.
Disclosure of Invention
The present disclosure provides a language switching method, device, apparatus, computer-readable storage medium, and product, which are used to solve the technical problems of large content occupation and long switching period of the existing language switching method.
A first aspect of the present disclosure is to provide a language switching method, including:
acquiring a language switching request, wherein the language switching request comprises a target language identifier to be switched of terminal equipment;
according to the language switching request, acquiring a to-be-translated entry of any language pre-stored in the terminal equipment, and sending the to-be-translated entry and the target language identifier to an online translation engine so that the online translation engine translates the to-be-translated entry into a processed entry corresponding to a target language;
sending the target language identification to a preset resource server according to the language switching request, wherein word libraries corresponding to multiple languages are pre-configured in the resource server;
respectively acquiring the processed entries sent by the online translation engine and a target word stock corresponding to a target language identifier sent by the resource server;
and switching the languages used by the terminal equipment according to the processed entries and the target word stock.
A second aspect of the present disclosure is to provide a language switching apparatus, including:
the system comprises an acquisition module, a switching module and a switching module, wherein the acquisition module is used for acquiring a language switching request, and the language switching request comprises a target language identifier to be switched of the terminal equipment;
the translation module is used for acquiring a to-be-translated entry of any language prestored in the terminal equipment according to the language switching request, and sending the to-be-translated entry and the target language identifier to an online translation engine so that the online translation engine translates the to-be-translated entry into a processed entry corresponding to the target language;
the sending module is used for sending the target language identifier to a preset resource server according to the language switching request, wherein word libraries corresponding to multiple languages are pre-configured in the resource server;
the receiving module is used for respectively acquiring the processed entries sent by the online translation engine and a target word stock corresponding to the target language identifier sent by the resource server;
and the processing module is used for switching the languages used by the terminal equipment according to the processed entries and the target word stock.
A third aspect of the present disclosure is to provide an electronic device, including: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to invoke program instructions in the memory to perform the language switching method of the first aspect.
A fourth aspect of the present disclosure is to provide a computer-readable storage medium having stored therein computer-executable instructions for implementing the language switching method according to the first aspect when the computer-executable instructions are executed by a processor.
A fifth aspect of the present disclosure is to provide a computer program product comprising a computer program which, when executed by a processor, implements the language switching method as described in the first aspect.
According to the language switching method, the language switching device, the language switching equipment, the computer readable storage medium and the computer readable storage product, when the language switching request is obtained, the vocabulary entry to be translated and the target language identification are sent to the online translation engine according to the target language identification to be switched in the language switching request, and the target language identification is sent to the preset resource server. And acquiring the processed entry sent by the online translation engine and a target word stock corresponding to the target language identification sent by the resource server, so that the language used by the terminal equipment can be switched according to the processed entry and the target word stock. By translating the entry to be translated on line and acquiring the target word stock on line, translation resources and the word stock do not need to be packaged in terminal equipment, and the memory required by language switching is effectively reduced. In addition, the translation operation is carried out on the vocabulary entry to be translated on line, the translation time is short, the language switching request of the user can be responded quickly, the currently used language is switched, the language switching efficiency is improved, and the user experience is optimized.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram of a system architecture upon which the present disclosure is based;
fig. 2 is a schematic flow chart of a language switching method according to a first embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an interface interaction provided by an embodiment of the present disclosure;
fig. 4 is a schematic flow chart of a language switching method according to a second embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a language switching device according to a third embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments obtained based on the embodiments in the disclosure belong to the protection scope of the disclosure.
In view of the above-mentioned technical problems of large content occupation and long switching period of the conventional language switching method, the present disclosure provides a language switching method, apparatus, device, computer-readable storage medium, and product.
It should be noted that the language switching method, apparatus, device, computer-readable storage medium and product provided by the present disclosure may be applied to various scenarios of language switching of terminal devices and application software.
The existing language switching method needs manual translation operation of entries on one hand, and the translation period is often long. On the other hand, information such as translated terms and word stocks also needs to be packaged in the terminal equipment, and the occupied space is large.
In the process of solving the technical problem, the inventor finds through research that in order to improve the efficiency of language switching and reduce the occupied space, the translation operation of the vocabulary entry can be realized in an online translation mode, and in addition, the word stock can be stored in a resource server. And when the language is required to be switched, performing entry translation in an online translation mode, acquiring a word stock in the resource server, and performing language switching operation according to the online translated entry and the word stock in the resource server.
Fig. 1 is a schematic diagram of a system architecture based on the present disclosure, as shown in fig. 1, the system architecture based on the present disclosure at least includes: the system comprises terminal equipment 11, an online translation engine 12 and a resource server 13, wherein a language switching device is arranged in the terminal equipment 11, and the language switching device can be written by adopting C/C + +, Java, Shell or Python and other languages; the terminal device 11 may be a desktop computer, a tablet computer, or the like. The resource server 13 may be a cloud server or a server cluster, and a large amount of data is stored therein.
Fig. 2 is a schematic flow chart of a language switching method according to a first embodiment of the present disclosure, as shown in fig. 2, the method includes:
step 201, a language switching request is obtained, wherein the language switching request includes a target language identifier to be switched by the terminal device.
The main execution body of this embodiment is a language switching device, which can be coupled to a terminal device, and the terminal device can be respectively in communication connection with the online translation engine and the resource server, and can perform information interaction with the online translation engine and the resource server according to the actual needs of the user, so as to implement language switching.
Optionally, the language switching device may be further coupled to a server, and the server may be capable of being in communication connection with the terminal device of the user, the online translation engine, and the resource server, so as to perform information interaction with the online translation engine and the resource server in response to a language switching request triggered by the user on the terminal device, thereby implementing language switching.
In this embodiment, when a user needs to switch a language displayed by the terminal device or any application software in the terminal device, a language switching request may be initiated on the terminal device according to an actual requirement, where the language switching request includes a target language identifier to be switched by the terminal device. For example, the language currently used by the user terminal device is chinese, and if the user needs to switch the language currently used by the terminal device to thai, a language switching request may be initiated on the terminal device, where the language switching request includes a identifier of the thai to be switched. Accordingly, the language switching device may obtain a user-initiated language switching request.
Step 202, obtaining a to-be-translated entry of any language pre-stored in the terminal device according to the language switching request, and sending the to-be-translated entry and the target language identifier to an online translation engine, so that the online translation engine translates the to-be-translated entry into a processed entry corresponding to the target language.
In the present embodiment, in order to improve the efficiency of language switching, the translation operation of the target language may be performed by the online translation engine. Specifically, after the language switching request is acquired, the entry to be translated in any language pre-stored in the terminal device may be acquired. And sending the entry to be translated and the target language identification to an online translation engine. Correspondingly, after the online translation engine acquires the entry to be translated and the target language identifier, the entry to be translated can be translated into the processed entry corresponding to the target language.
The term to be translated of any language pre-stored in the terminal device can be a Chinese term to be translated, an English term to be translated or a stored term to be translated of any language. For example, after the switching request is obtained, the Chinese vocabulary entry to be translated pre-stored in the terminal device may be sent to the online translation engine. After the online translation engine acquires the Chinese entry to be translated, the Chinese entry to be translated can be translated into the Thai entry to be translated.
Step 203, sending the target language identifier to a preset resource server according to the language switching request, wherein a word stock corresponding to a plurality of languages is pre-configured in the resource server.
In the present embodiment, in order to display the switched language, it is also necessary to acquire font data corresponding to the target language identifier. Therefore, in order to reduce the storage space occupied by language switching, a resource server may be configured in advance, wherein the resource server is configured with word libraries corresponding to a plurality of languages in advance. After the language switching request is acquired, the language switching device can also send the target language identifier to a preset resource server.
And 204, respectively acquiring the processed entries sent by the online translation engine and a target word stock corresponding to the target language identifier sent by the resource server.
In this embodiment, the online translation engine may feed back the processed entry to the language switching device after completing the translation operation of the entry to be translated. After acquiring the target language identifier, the resource server may feed back the target word stock corresponding to the target language identifier to the language switching device. Accordingly, the language switching device can respectively acquire the processed entries sent by the online translation engine and the target word stock corresponding to the target language identification sent by the resource server.
And 205, switching the languages used by the terminal equipment according to the processed entries and the target word stock.
In this embodiment, after the processed vocabulary entry and the target word stock are obtained, the language used by the terminal device may be switched according to the processed vocabulary entry and the target word stock.
In the above example, after the entry to be translated of the Thai language and the Thai language library are respectively obtained, the currently displayed Chinese language can be switched according to the entry to be translated of the Thai language and the Thai language library.
Further, on the basis of the first embodiment, the step 201 includes:
responding to the triggering operation of a user on a preset switching icon, and displaying a language switching list on a display interface, wherein the language switching list comprises a plurality of language identifications to be switched.
And acquiring the selection operation of the user on the language switching list, and determining the language identifier to be switched selected by the user as the target language identifier to be switched.
In this embodiment, a switching icon may be provided on the display interface, and when the user needs to switch the language, the switching icon may be triggered. Responding to the triggering operation, a language switching list can be displayed on a display interface, wherein the language switching list comprises a plurality of language identifications to be switched, and a user can select a target language identification needing to be switched in the language switching list according to actual requirements. And acquiring the selection operation of the user on the language switching list, and determining the language identifier to be switched selected by the user as the target language identifier to be switched.
Fig. 3 is an interface interaction schematic diagram provided by the embodiment of the present disclosure, and as shown in fig. 3, a switching icon 31 may be arranged on a display interface, and when a user needs to switch a language, a trigger operation may be performed on the switching icon 31. In response to the triggering operation of the user, a language switching list 32 can be displayed on the display interface, wherein the language switching list 32 includes a plurality of to-be-switched language identifications 33. The user can select the language identifier 33 to be switched according to actual requirements, and determine the target language identifier to be switched.
Further, on the basis of the first embodiment, the step 205 includes:
and matching the processed entry and the target word stock to obtain the language to be displayed.
And switching the languages used by the terminal equipment according to the languages to be displayed.
In this embodiment, after the processed vocabulary entry and the target word stock are obtained, for the content displayed on the page, matching operation may be performed by using the processed vocabulary entry and the target word stock corresponding to the content, so as to obtain the language to be displayed. And switching the language currently displayed on the display interface into the language to be displayed, so as to realize the switching operation of the language.
In the language switching method provided by this embodiment, when the language switching request is obtained, the vocabulary entry to be translated and the target language identifier are sent to the online translation engine according to the target language identifier to be switched in the language switching request, and the target language identifier is sent to the preset resource server. And acquiring the processed entry sent by the online translation engine and a target word stock corresponding to the target language identification sent by the resource server, so that the language used by the terminal equipment can be switched according to the processed entry and the target word stock. By translating the entry to be translated on line and acquiring the target word stock on line, translation resources and the word stock do not need to be packaged in terminal equipment, and the memory required by language switching is effectively reduced. In addition, the translation operation is carried out on the vocabulary entry to be translated on line, the translation time is short, the language switching request of the user can be responded quickly, the currently used language is switched, the language switching efficiency is improved, and the user experience is optimized.
Fig. 4 is a schematic flow chart of a language switching method provided in the second embodiment of the present disclosure, where on the basis of the first embodiment, the resource server is further configured with standard translation resources corresponding to multiple target entries corresponding to each target language identifier; as shown in fig. 3, after step 204, the method further includes:
step 401, a correction request is obtained, wherein the correction request includes entry information to be corrected.
Step 402, according to the correction request, sending the entry information to be corrected to the resource server.
And 403, performing correction operation on the processed entry according to the standard translation resource fed back by the resource server.
In this embodiment, since there are specialized words in some areas and there may be spoken language, slang language, etc. in the contents to be displayed, the translation operation performed by the online translation engine may not be accurate enough. Therefore, to improve the accuracy of the switched language, the correction operation may be performed on the processed entries translated by the online translation engine.
Specifically, standard translation resources corresponding to a plurality of target entries corresponding to each target language identifier of the manual translation may be configured in the resource server in advance. The user can trigger the correction request according to the actual requirement, and the language switching device can acquire the correction request, wherein the correction request comprises the entry information to be corrected. And sending the entry information to be corrected to a resource server according to the correction request. The resource server can obtain standard translation resources corresponding to the entry to be corrected according to the entry to be corrected. Therefore, the entry to be corrected in the processed entries can be corrected according to the standard translation resources.
Further, on the basis of any of the above embodiments, step 403 includes:
and displaying a correction reminding dialog box on a display interface, wherein the correction reminding dialog box comprises correction options.
And responding to the triggering operation of the user on the confirmation correction option, and performing correction operation on the processed entry according to the standard translation resource fed back by the resource server.
In this embodiment, after the standard translation resource corresponding to the entry to be corrected, which is fed back by the resource server, is obtained, before the correction operation is performed, the actual requirement of the user may be further inquired. Specifically, a correction reminding dialog box can be displayed on the display interface, and correction options are included in the correction reminding dialog box. And when the user selects and confirms the correction option, correcting the processed entry according to the standard translation resource fed back by the resource server.
According to the language switching method provided by the embodiment, the correction operation is performed on the processed entry according to the correction request of the user, so that the accuracy of the displayed language can be improved on the basis of ensuring the language switching efficiency, and the user experience is further improved.
Further, on the basis of any of the above embodiments, the modification request includes a target language identifier;
step 403 comprises:
acquiring standard translation information corresponding to the target language identification fed back by the resource server;
and replacing the target entry in the processed entries according to the standard translation information.
In this embodiment, the entry information to be modified may specifically be a target language identifier. After sending the target language identifier to the resource server, the resource server may feed back all standard translation information corresponding to the target language identifier according to the target language identifier. Accordingly, after acquiring the standard translation information corresponding to the target language identifier, the language switching device may perform a replacement operation on the target entry in the processed entries according to the standard translation information corresponding to the target language identifier.
For example, the entry information to be modified may be a tag in the thai language, and the resource server stores standard translation information of a target entry of manual translation corresponding to various language tags. After the Thai identifier is acquired, standard translation information corresponding to the Thai identifier can be fed back to the language switching device.
Further, on the basis of any of the above embodiments, the modification request includes a target entry selected by the user;
step 403 comprises:
obtaining standard translation information which is fed back by the resource server and corresponds to the target entry selected by the user;
and replacing the target entry selected by the user in the processed entry according to the standard translation information.
In this embodiment, the entry information to be corrected may specifically be a target entry selected by the user. The target entry selected by the user can be an entry which is found to be inaccurate in translation in the using process of the user. The resource server can inquire and feed back standard translation information corresponding to the target entry selected by the user according to the target entry selected by the user. Therefore, after acquiring the standard translation information corresponding to the target entry selected by the user, the language server may perform a replacement operation on the target entry in the processed entries according to the standard translation information corresponding to the target entry selected by the user.
Further, on the basis of any of the above embodiments, the replacing, according to the standard translation information, the target entry selected by the user in the processed entry, includes:
if the standard translation information corresponding to the target entry selected by the user exists in the resource server, replacing the target entry selected by the user in the processed entry according to the standard translation information;
and if the standard translation information corresponding to the target entry selected by the user does not exist in the resource server and the standard translation information fed back by the resource server is blank information, not performing replacement operation on the target entry selected by the user.
In this embodiment, for the target entry selected by the user, there may be no standard translation information corresponding to the target entry in the resource server, so if there is standard translation information corresponding to the target entry selected by the user in the resource server, the target entry selected by the user in the processed entry is replaced according to the standard translation information. On the contrary, if the standard translation information corresponding to the target entry selected by the user does not exist in the resource server and the standard translation information fed back by the resource server is blank information, the target entry selected by the user is not replaced.
Optionally, if the resource server does not include the standard translation information corresponding to the target entry, in order to further improve the user experience, such an entry may be sent to the operation and maintenance staff periodically or in real time, and the operation and maintenance staff performs the translation operation, so as to implement the update operation on the standard translation information stored in the resource server.
Further, on the basis of any of the above embodiments, the modification request includes a category identifier selected by the user;
step 403 comprises:
obtaining standard translation information which is fed back by the resource server and corresponds to the category identification selected by the user;
and replacing the target entry corresponding to the category identification selected by the user in the processed entry according to the standard translation information.
In this embodiment, the entry information to be corrected may specifically be a category identifier selected by a user, where the category identifier may be any one of a category identifier of application software, an identifier of an operating system, an identifier of a display mode, and the like, and the disclosure does not limit this. The resource server can inquire and feed back standard translation information corresponding to the category identification according to the category identification. Therefore, after the language server acquires the standard translation information corresponding to the category identifier, the language server can perform replacement operation on the target entry in the processed entries according to the standard translation information corresponding to the category identifier.
According to the language switching method provided by the embodiment, the standard translation information is acquired according to different entry information to be corrected, so that the correction operation on the processed entry according to the correction request of the user can be realized, the accuracy of the displayed language can be improved on the basis of ensuring the language switching efficiency, the applicability of the language switching can be improved, and the user experience can be further improved.
Fig. 5 is a schematic structural diagram of a language switching device according to a third embodiment of the present disclosure, and as shown in fig. 5, the language switching device includes: an acquisition module 51, a translation module 52, a transmission module 53, a reception module 54, and a processing module 55. The obtaining module 51 is configured to obtain a language switching request, where the language switching request includes a target language identifier to be switched by a terminal device. The translation module 52 is configured to obtain a to-be-translated entry of any language pre-stored in the terminal device according to the language switching request, and send the to-be-translated entry and the target language identifier to the online translation engine, so that the online translation engine translates the to-be-translated entry into a processed entry corresponding to the target language. And a sending module 53, configured to send the target language identifier to a preset resource server according to the language switching request, where a word stock corresponding to multiple languages is preconfigured in the resource server. And a receiving module 54, configured to obtain the processed entries sent by the online translation engine and the target word stock corresponding to the target language identifier sent by the resource server, respectively. And the processing module 55 is configured to switch the language used by the terminal device according to the processed vocabulary entry and the target word stock.
Further, on the basis of the third embodiment, the obtaining module is configured to: responding to the triggering operation of a user on a preset switching icon, and displaying a language switching list on a display interface, wherein the language switching list comprises a plurality of language identifications to be switched. And acquiring the selection operation of the user on the language switching list, and determining the language identifier to be switched selected by the user as the target language identifier to be switched.
Further, on the basis of the third embodiment, the processing module is configured to: and matching the processed entry and the target word stock to obtain the language to be displayed. And switching the languages used by the terminal equipment according to the languages to be displayed.
Further, on the basis of the third embodiment, the resource server is further configured with standard translation resources corresponding to a plurality of target entries corresponding to each target language identifier. The device further comprises: the obtaining module is further configured to obtain a correction request, where the correction request includes entry information to be corrected. And the acquisition module is also used for sending the entry information to be corrected to the resource server according to the correction request. And the correction module is used for performing correction operation on the processed entry according to the standard translation resource fed back by the resource server.
Further, on the basis of any of the above embodiments, the modification module is configured to: and displaying a correction reminding dialog box on a display interface, wherein the correction reminding dialog box comprises correction options. And responding to the triggering operation of the user on the correction option confirmation, and performing correction operation on the processed entry according to the standard translation resource fed back by the resource server.
Further, on the basis of any of the above embodiments, the modification request includes a target language identifier. The correction module is used for: and acquiring standard translation information which is fed back by the resource server and corresponds to the target language identification. And replacing the target entry in the processed entries according to the standard translation information.
Further, on the basis of any of the above embodiments, the modification request includes a target entry selected by the user. The correction module is used for: and acquiring standard translation information which is fed back by the resource server and corresponds to the target entry selected by the user. And replacing the target entry selected by the user in the processed entry according to the standard translation information.
Further, on the basis of any of the above embodiments, the modification module is configured to: and if the standard translation information corresponding to the target entry selected by the user exists in the resource server, replacing the target entry selected by the user in the processed entry according to the standard translation information. And if the standard translation information corresponding to the target entry selected by the user does not exist in the resource server and the standard translation information fed back by the resource server is blank information, not performing replacement operation on the target entry selected by the user.
Further, on the basis of any of the above embodiments, the revision request includes a category identifier selected by the user. The correction module is used for: and acquiring standard translation information which is fed back by the resource server and corresponds to the category identification selected by the user. And replacing the target entry corresponding to the category identification selected by the user in the processed entry according to the standard translation information.
Yet another embodiment of the present disclosure further provides an electronic device, including: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to call the program instructions in the memory to execute the language switching method according to any of the embodiments.
Fig. 6 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present disclosure, and as shown in fig. 6, it illustrates a schematic structural diagram of an electronic device 600 suitable for implementing the fourth embodiment of the present disclosure, where the electronic device 600 may be a terminal device or a server. Among them, the terminal Device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a Digital broadcast receiver, a Personal Digital Assistant (PDA), a tablet computer (PAD), a Portable Multimedia Player (PMP), a car terminal (e.g., car navigation terminal), etc., and a fixed terminal such as a Digital TV, a desktop computer, etc. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, the electronic device 600 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 601, which may perform various suitable actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
Still another embodiment of the present disclosure further provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-readable storage medium is configured to implement the language switching method according to any one of the above embodiments.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
Yet another embodiment of the present disclosure further provides a computer program product comprising a computer program, which when executed by a processor implements the language switching method according to any of the above embodiments.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the present disclosure, and not for limiting the same; while the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the 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 disclosure.

Claims (12)

1. A method for switching languages, comprising:
acquiring a language switching request, wherein the language switching request comprises a target language identifier to be switched of terminal equipment;
according to the language switching request, acquiring a to-be-translated entry of any language pre-stored in the terminal equipment, and sending the to-be-translated entry and the target language identifier to an online translation engine so that the online translation engine translates the to-be-translated entry into a processed entry corresponding to a target language;
sending the target language identification to a preset resource server according to the language switching request, wherein word libraries corresponding to multiple languages are pre-configured in the resource server;
respectively acquiring the processed entries sent by the online translation engine and a target word stock corresponding to a target language identifier sent by the resource server;
and switching the languages used by the terminal equipment according to the processed entries and the target word stock.
2. The method according to claim 1, wherein the resource server is further configured with standard translation resources corresponding to a plurality of target terms corresponding to each target language identifier;
after the processed entries sent by the online translation engine and the target word stock corresponding to the target language identifier sent by the resource server are respectively obtained, the method further comprises the following steps:
acquiring a correction request, wherein the correction request comprises entry information to be corrected;
according to the correction request, sending the entry information to be corrected to the resource server;
and correcting the processed entry according to the standard translation resource fed back by the resource server.
3. The method of claim 2, wherein the revision request includes a target language identification;
the correcting operation of the processed entry according to the standard translation resource fed back by the resource server comprises the following steps:
acquiring standard translation information corresponding to the target language identification fed back by the resource server;
and replacing the target entry in the processed entries according to the standard translation information.
4. The method of claim 2, wherein the modification request includes a target entry selected by a user;
the correcting operation of the processed entry according to the standard translation resource fed back by the resource server comprises the following steps:
obtaining standard translation information which is fed back by the resource server and corresponds to the target entry selected by the user;
and replacing the target entry selected by the user in the processed entry according to the standard translation information.
5. The method of claim 4, wherein said replacing the user-selected target entry in the processed entry according to the standard translation information comprises:
if the standard translation information corresponding to the target entry selected by the user exists in the resource server, replacing the target entry selected by the user in the processed entry according to the standard translation information;
and if the standard translation information corresponding to the target entry selected by the user does not exist in the resource server and the standard translation information fed back by the resource server is blank information, not performing replacement operation on the target entry selected by the user.
6. The method according to claim 2, wherein the modification request includes a category identifier selected by a user;
the correcting operation of the processed entry according to the standard translation resource fed back by the resource server comprises the following steps:
obtaining standard translation information which is fed back by the resource server and corresponds to the category identification selected by the user;
and replacing the target entry corresponding to the category identification selected by the user in the processed entry according to the standard translation information.
7. The method according to any one of claims 2-6, wherein said performing a modification operation on said processed entry according to the standard translation resource fed back by said resource server comprises:
displaying a correction reminding dialog box on a display interface, wherein the correction reminding dialog box comprises correction options;
and responding to the triggering operation of the user on the correction option confirmation, and performing correction operation on the processed entry according to the standard translation resource fed back by the resource server.
8. The method according to any one of claims 1-6, wherein said switching the language used by the terminal device according to the processed vocabulary entry and the target word stock comprises:
matching the processed entry and the target word stock to obtain a language to be displayed;
and switching the languages used by the terminal equipment according to the languages to be displayed.
9. The method according to any of claims 1-6, wherein said obtaining a language switching request comprises:
responding to the triggering operation of a user on a preset switching icon, and displaying a language switching list on a display interface, wherein the language switching list comprises a plurality of language identifications to be switched;
and acquiring the selection operation of the user on the language switching list, and determining the language identifier to be switched selected by the user as the target language identifier to be switched.
10. A language switching device, comprising:
the system comprises an acquisition module, a switching module and a switching module, wherein the acquisition module is used for acquiring a language switching request, and the language switching request comprises a target language identifier to be switched of the terminal equipment;
the translation module is used for acquiring a to-be-translated entry of any language prestored in the terminal equipment according to the language switching request, and sending the to-be-translated entry and the target language identifier to an online translation engine so that the online translation engine translates the to-be-translated entry into a processed entry corresponding to the target language;
the sending module is used for sending the target language identifier to a preset resource server according to the language switching request, wherein word libraries corresponding to multiple languages are pre-configured in the resource server;
the receiving module is used for respectively acquiring the processed entries sent by the online translation engine and a target word stock corresponding to the target language identifier sent by the resource server;
and the processing module is used for switching the languages used by the terminal equipment according to the processed entries and the target word stock.
11. An electronic device, comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to invoke program instructions in the memory to perform the language switching method of any of claims 1-9.
12. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, are configured to implement the language switching method of any one of claims 1-9.
CN202210131854.8A 2022-02-14 2022-02-14 Language switching method, device, equipment, computer readable storage medium and product Pending CN114168251A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210131854.8A CN114168251A (en) 2022-02-14 2022-02-14 Language switching method, device, equipment, computer readable storage medium and product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210131854.8A CN114168251A (en) 2022-02-14 2022-02-14 Language switching method, device, equipment, computer readable storage medium and product

Publications (1)

Publication Number Publication Date
CN114168251A true CN114168251A (en) 2022-03-11

Family

ID=80489907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210131854.8A Pending CN114168251A (en) 2022-02-14 2022-02-14 Language switching method, device, equipment, computer readable storage medium and product

Country Status (1)

Country Link
CN (1) CN114168251A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004334791A (en) * 2003-05-12 2004-11-25 Internatl Business Mach Corp <Ibm> Machine translation apparatus, data processing method and program
AU2004318192A1 (en) * 2004-04-06 2005-10-20 Department Of Information Technology A system for multiligual machine translation from English to Hindi and other Indian languages using pseudo-interlingua and hybridized approach
CN104536955A (en) * 2014-12-24 2015-04-22 深圳熙谷威生物医疗科技有限公司 Method and system for configuring machine language, word stock file and translation file through PC
CN106250375A (en) * 2016-08-09 2016-12-21 北京百度网讯科技有限公司 Translation processing method and device
CN106844357A (en) * 2017-01-19 2017-06-13 深圳大学 Big sentence storehouse interpretation method
KR101818598B1 (en) * 2016-08-09 2018-03-02 주식회사 에버트란 Server and method for automatic translation
CN109582977A (en) * 2018-11-20 2019-04-05 科大讯飞股份有限公司 A kind of interactive text interpretation method and device
CN109685202A (en) * 2018-12-17 2019-04-26 腾讯科技(深圳)有限公司 Data processing method and device, storage medium and electronic device
CN110941965A (en) * 2018-09-06 2020-03-31 重庆好德译信息技术有限公司 Instant translation system based on professional language
CN111539229A (en) * 2019-01-21 2020-08-14 波音公司 Neural machine translation model training method, neural machine translation method and device
CN112434537A (en) * 2020-11-24 2021-03-02 掌阅科技股份有限公司 Translation text consistency checking method, computing device and storage medium
CN112487334A (en) * 2020-11-30 2021-03-12 深圳壹账通智能科技有限公司 Method, apparatus, computer device and medium for front end page language translation
CN112988297A (en) * 2021-03-10 2021-06-18 深圳市创想三维科技有限公司 Language switching method and device based on touch screen, electronic equipment and storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004334791A (en) * 2003-05-12 2004-11-25 Internatl Business Mach Corp <Ibm> Machine translation apparatus, data processing method and program
AU2004318192A1 (en) * 2004-04-06 2005-10-20 Department Of Information Technology A system for multiligual machine translation from English to Hindi and other Indian languages using pseudo-interlingua and hybridized approach
CN104536955A (en) * 2014-12-24 2015-04-22 深圳熙谷威生物医疗科技有限公司 Method and system for configuring machine language, word stock file and translation file through PC
CN106250375A (en) * 2016-08-09 2016-12-21 北京百度网讯科技有限公司 Translation processing method and device
KR101818598B1 (en) * 2016-08-09 2018-03-02 주식회사 에버트란 Server and method for automatic translation
CN106844357A (en) * 2017-01-19 2017-06-13 深圳大学 Big sentence storehouse interpretation method
CN110941965A (en) * 2018-09-06 2020-03-31 重庆好德译信息技术有限公司 Instant translation system based on professional language
CN109582977A (en) * 2018-11-20 2019-04-05 科大讯飞股份有限公司 A kind of interactive text interpretation method and device
CN109685202A (en) * 2018-12-17 2019-04-26 腾讯科技(深圳)有限公司 Data processing method and device, storage medium and electronic device
CN111539229A (en) * 2019-01-21 2020-08-14 波音公司 Neural machine translation model training method, neural machine translation method and device
CN112434537A (en) * 2020-11-24 2021-03-02 掌阅科技股份有限公司 Translation text consistency checking method, computing device and storage medium
CN112487334A (en) * 2020-11-30 2021-03-12 深圳壹账通智能科技有限公司 Method, apparatus, computer device and medium for front end page language translation
CN112988297A (en) * 2021-03-10 2021-06-18 深圳市创想三维科技有限公司 Language switching method and device based on touch screen, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109947512B (en) Text adaptive display method, device, server and storage medium
US11711441B2 (en) Method and apparatus for publishing video synchronously, electronic device, and readable storage medium
CN109460233B (en) Method, device, terminal equipment and medium for updating native interface display of page
US11283740B2 (en) Name label display method and apparatus
CN110209315B (en) Method and device for displaying characters in user interface, electronic equipment and storage medium
CN109753332B (en) Method and device for displaying information
CN114491349B (en) Page display method, page display device, electronic device, storage medium and program product
EP4089516A1 (en) Icon updating method and apparatus, and electronic device
US20230350502A1 (en) Information input method, system of cloud input method and client
CN109168012B (en) Information processing method and device for terminal equipment
CN110865846B (en) Application management method, device, terminal, system and storage medium
US20230117037A1 (en) Comment sharing method, apparatus and electronic device
CN111694629A (en) Information display method and device and electronic equipment
CN115495175A (en) Picture display method and device, terminal equipment and computer medium
US10936339B2 (en) Data sharing method and apparatus, electronic device and computer-readable storage medium
CN110908752A (en) Control setting method and device, electronic equipment and interaction system
CN108768823B (en) Method and equipment for processing message and displaying message
US20220215482A1 (en) User information processing method, apparatus, electronic device, and computer storage medium
EP3609186A1 (en) Method for acquiring and providing information and related device
CN112256370A (en) Information display method and device and electronic equipment
CN114168251A (en) Language switching method, device, equipment, computer readable storage medium and product
CN111177634A (en) Multi-language supporting file content loading method, device, equipment and medium
CN115562527A (en) Comment information publishing method and device, electronic equipment and storage medium
CN111314209B (en) Message sending method, device, terminal and storage medium
CN112947918A (en) Data display method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20220311

RJ01 Rejection of invention patent application after publication