CN115526186A - Translation method, electronic device and readable storage medium - Google Patents

Translation method, electronic device and readable storage medium Download PDF

Info

Publication number
CN115526186A
CN115526186A CN202110716490.5A CN202110716490A CN115526186A CN 115526186 A CN115526186 A CN 115526186A CN 202110716490 A CN202110716490 A CN 202110716490A CN 115526186 A CN115526186 A CN 115526186A
Authority
CN
China
Prior art keywords
character
translated
target
language
translation
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
CN202110716490.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.)
Shanghai Pateo Network Technology Service Co Ltd
Original Assignee
Shanghai Pateo Network Technology Service 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 Shanghai Pateo Network Technology Service Co Ltd filed Critical Shanghai Pateo Network Technology Service Co Ltd
Priority to CN202110716490.5A priority Critical patent/CN115526186A/en
Priority to PCT/CN2021/139671 priority patent/WO2022267394A1/en
Publication of CN115526186A publication Critical patent/CN115526186A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application provides a translation method, electronic equipment and a readable storage medium. The method comprises the following steps: determining whether a translation identifier exists in the input characters; determining a character to be translated in the characters based on the translation identifier, wherein the translation identifier corresponds to a target language; and translating the character to be translated into the target language to obtain a target character. The method and the device for character translation can save character translation time and improve user experience.

Description

Translation method, electronic device and readable storage medium
Technical Field
The present application relates to the field of character processing technologies, and in particular, to a translation method, an electronic device, and a readable storage medium.
Background
With the development of the technology level, electronic devices have become an indispensable tool in people's life and work, such as computer office work, mobile phone chat, etc.
In the application process, after a user inputs text through the electronic device, the input text may need to be translated into other languages, such as translating Chinese characters input by the user in a Chinese document into English, or translating text input by the user while chatting into Japanese, and the like. Generally, when a user needs to translate a text, the user needs to input the text, open a webpage or a translation tool, copy the text into a webpage translation box or the translation tool for translation, and copy the translated content into a document or a session box. The operation flow of the text translation mode is complicated, the time for the user to translate the text is undoubtedly increased, and the user experience is reduced.
Disclosure of Invention
The embodiment of the application provides a translation method, an electronic device and a readable storage medium, so as to solve the problems that a text translation mode in the related art is complex in operation flow, the time for a user to perform text translation is increased, and the user experience is reduced.
In order to solve the above technical problem, an embodiment of the present application provides a translation method, including the following steps:
determining whether a translation identifier exists in the input characters;
determining a character to be translated in the characters based on the translation identifier, wherein the translation identifier corresponds to a target language;
and translating the character to be translated into the target language to obtain a target character.
Optionally, the determining a character to be translated from the characters based on the translation identifier includes:
and acquiring the rest characters except the translation identifier in the input characters, and taking the rest characters as the characters to be translated.
Optionally, the determining a character to be translated from the characters based on the translation identifier includes:
acquiring a symbol identifier added in an input character;
determining a character to be translated among the characters based on the symbol identifier.
Optionally, the method further comprises the steps of:
acquiring an initial language corresponding to the character to be translated;
the step of translating the character to be translated into the target language to obtain a target character comprises the following steps:
and translating the character to be translated from the initial language to the target language to obtain the target character.
Optionally, the obtaining of the initial language corresponding to the character to be translated includes the following steps:
acquiring the language of an input method for inputting characters, and taking the language of the input method as the initial language; or
And acquiring a system language, and taking the system language as the initial language.
Optionally, after the character to be translated is translated into the target language to obtain a target character, the method further includes the following steps:
displaying the target character and the character to be translated;
receiving the target character or the character to be translated selected from the target character and the character to be translated;
and keeping the selected character displayed.
Optionally, after the character to be translated is translated into the target language to obtain a target character, the method further includes the following steps:
receiving touch operation on a target control;
and responding to the touch operation, and displaying the target character.
Optionally, after the character to be translated is translated into the target language to obtain a target character, the method further includes the following steps:
displaying the target character;
receiving a character selected from the target characters;
and keeping the selected character displayed.
In order to solve the above technical problem, an embodiment of the present application further provides an electronic device, including:
a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the translation method of any of the above.
In order to solve the above technical problem, an embodiment of the present application further provides a readable storage medium, where instructions, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the translation method described in any one of the above.
In the embodiment of the application, whether a translation identifier exists in an input character or not is determined, a character to be translated in the character is determined based on the translation identifier, wherein the translation identifier corresponds to a target language, and the character to be translated is translated into the target language to obtain the target character. According to the method and the device, the translation identifier is input into the input character by the user, the character to be translated and the target language can be identified through the translation identifier, so that the translation operation of the character to be translated is realized, the user does not need to open a webpage or a translation tool and the like to translate the character, the character translation time is saved, and the user experience is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating steps of a translation method according to an embodiment of the present application;
FIG. 2 is a diagram illustrating a text translation provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Example one
Referring to fig. 1, a flowchart illustrating steps of a translation method provided by an embodiment of the present application is shown, and as shown in fig. 1, the translation method may include the following steps:
step 101: it is determined whether a translation identifier is present in the input character.
The method and the device for translating the characters can be applied to a scene that the characters to be translated and the target language are determined by combining the translation identifier input by the user, and the characters to be translated are translated into the target language.
The translation identifier refers to an identifier input by the user and used for indicating the character to be translated and the target language (i.e. the language in which the character to be translated needs to be translated), and in this example, the translation identifier may be a character corresponding to the target language, for example, when the character to be translated in chinese needs to be translated into english, the target language is english, and at this time, "yingyu" or "english" input by the user may be used as the translation identifier. The translation identifier may also be a symbol identifier, such as a symbol of "&", "#", or "@", specifically, a specific presentation form of the translation identifier may be determined according to a service requirement, which is not limited in this embodiment.
The input character may be a character displayed in a character input box, or may be a character displayed in a character document.
After a user enters a character in a character input box or a character in a character document, the character entered by the user may be detected to determine whether a translation identifier exists in the entered character. For example, when the translation identifier preset by the system is a character corresponding to the target language, it may be determined whether or not a character corresponding to the target language exists in the input character, for example, whether or not a character such as "riyu", "yingyu", or "japanese" exists in the input character. When the translation identifier preset by the system is a symbol identifier, it may be determined whether a symbol identifier exists in the input character, for example, whether a symbol identifier such as "#", "@", "&" exists in the input character, or the like.
If the translation identifier does not exist in the input characters, the subsequent steps are not needed to be processed.
If it is determined that the translation identifier exists in the input character, step 102 is performed.
Step 102: determining a character to be translated in the characters based on the translation identifier, wherein the translation identifier corresponds to a target language.
The character to be translated refers to a character which needs to be translated in the input characters.
The target language is a language in which the character to be translated needs to be translated, for example, when the character to be translated is a chinese language and the character to be translated needs to be translated into an english language, the english language is used as the target language, and the like.
In a specific implementation, the target language can be determined by translating the identifier, and specifically, when the translation identifier is an identifier corresponding to the target language, the target language can be directly identified by translating the identifier. When the translation identifier is a symbolic identifier, the system may preset a target language corresponding to the symbolic identifier, for example, the target language corresponding to the symbolic identifier "@" preset by the system is: in english, the symbol identifier "&" corresponds to a target language: in japanese, the target language corresponding to the symbol identifier "#" is: german, etc. when it is determined that a symbol identifier exists in the inputted characters, the target language, etc. can be specified by the symbol identifier.
When it is determined that a translation identifier exists in the input characters, the characters to be translated in the characters may be determined based on the translation identifier, in this example, the display positions of the input characters are different, and the manner of determining the characters to be translated is also different, and specifically, the following detailed description may be performed in combination with the following two specific implementations.
In a specific implementation manner of the present application, the step 102 may include:
substep A1: and acquiring the rest characters except the translation identifier in the input characters, and taking the rest characters as the characters to be translated.
In this embodiment, when the input character is a character in the character input box, the remaining characters except for the translation identifier in the character input box by the user may be obtained, and the remaining characters are used as the characters to be translated, for example, as shown in fig. 2, the character input by the user in the character input box is "zhaopianriyu", where "riyu" is the translation identifier, and at this time, the remaining character "zhaopian" except for the translation identifier in the input character may be used as the character to be translated. Or, the character input by the user in the character input box is "Chinese #", wherein "#" is a translation identifier, at this time, the remaining character "Chinese" in the input character except the translation identifier may be used as an identifier to be translated, and the like.
In another specific implementation manner of the present application, the step 102 may include:
substep B1: and acquiring the symbol identifier added in the input character.
Substep B2: determining a character to be translated of the characters based on the symbol identifier.
In this embodiment, when the input character is a character in a character document, a symbol identifier added to the input character may be obtained, and the character to be translated in the character may be determined by combining the symbol identifier, which specifically includes the following two ways:
1. the character to be translated in the middle of two identical symbol identifiers is taken as the character to be translated, for example, the character entered by the user in the character document is "# where to go on weekend" # ", where the symbol identifier is" # ", at this time, the character" where to go on weekend "between two" # "may be taken as the character to be translated, and so on.
2. The character to be translated is determined through punctuation marks and mark identifiers, for example, the character input by a user in the character document is 'weekend has a case meeting' @ meeting personnel have: xxxxxx. "wherein, the symbol identifier is" @ ", at this moment, can regard as waiting to translate all characters between" @ "and the period, promptly wait to translate the character for" the participant has: xxxxxx ". Or the character input by the user in the character document is 'a regular meeting on weekend', and the participators have: AABBCC & ", where the symbol identifier is" & ", in this case, all characters between" & "and the last punctuation symbol may be used as characters to be translated, that is, the characters to be translated are" members of the conference: AABBCC' and the like.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not intended to limit the present embodiment.
After determining the character to be translated among the input characters based on the translation identifier, step 103 is performed.
Step 103: and translating the character to be translated into the target language to obtain a target character.
The target character refers to a character obtained after the character to be translated is translated.
After determining the character to be translated in the character based on the translation identifier, the character to be translated may be translated into a target language to obtain the target character, specifically, an initial language corresponding to the character to be translated may be obtained, and the character to be translated is translated from the initial language into the target language to obtain the target character, which may be described in detail in combination with the following specific implementation manner.
In a specific implementation manner of the present application, the method may further include the following steps:
step B1: and acquiring an initial language corresponding to the character to be translated.
In this embodiment, the initial language refers to a language corresponding to a character to be translated, for example, when the character to be translated is a chinese character, the initial language corresponding to the character to be translated is a chinese language.
Before the translation of the character to be translated is needed, an initial language corresponding to the character to be translated may be obtained, specifically, a language of an input method for inputting the character may be obtained, and the language of the input method is used as the initial language, for example, when a user inputs the character by using the XX input method, a chinese language is used as the initial language, and the like. Of course, the system language may be acquired and used as the initial language.
After the initial language corresponding to the character to be translated is obtained, the character to be translated may be translated by combining the initial language and the target language, and specifically, the following specific implementation manner may be described in detail.
In another specific implementation manner of the present application, the step 103 may include:
substep B1: and translating the character to be translated from the initial language to the target language to obtain the target character.
In this embodiment, after obtaining an initial language corresponding to a character to be translated and determining a target language according to a translation identifier, the character to be translated may be translated from the initial language to the target language to obtain the target character, for example, the character to be translated is a "photo", the initial language is chinese, the target language is english, and after the character to be translated is translated from chinese to english, the target character "photo" may be obtained. And after the character to be translated is 'china', the initial language is english, the target language is chinese, and the character to be translated is translated from english to chinese, the target character 'china' and the like can be obtained. Or, as shown in fig. 2, the character to be translated is a "photo", the initial language is chinese, the target language is japanese, and after the character to be translated is translated from chinese to japanese, the target character "portrait" can be obtained, as shown in fig. 2, the character to be translated and the target character can be simultaneously displayed in the display column of the character input box, as shown in fig. 1, the character 2 is shown, and the corresponding identifier is displayed at the position associated with the target character, as shown in fig. 2, "day", which can facilitate the user to select the character.
It should be understood that the above examples are only examples for better understanding of the technical solutions of the embodiments of the present application, and are not to be taken as the only limitation to the embodiments.
In this embodiment, after the target character is obtained through translation, the target character and the character to be translated may also be displayed for selection by a user, and specifically, the detailed description may be described in conjunction with the following specific implementation manner.
In another specific implementation manner of the present application, after the step 103, the method may further include:
step C1: and displaying the target character and the character to be translated.
In this embodiment, after the target character is obtained, the target character and the character to be translated may be displayed, in practical application, the target character and the character to be translated may be displayed in a pop-up window manner, or the target character and the character to be translated may be displayed in a list manner, and specifically, the display form of the target character and the character to be translated may be determined according to a business requirement, which is not limited in this embodiment.
After the target character and the character to be translated are displayed, step C2 is performed.
And step C2: receiving the target character or the character to be translated selected from among the target character and the character to be translated.
After the target character and the character to be translated are displayed, a user can select the character from the target character and the character to be translated, and specifically, the user can perform touch operation on the displayed target character or the character to be translated to realize character selection.
After receiving a target character or a character to be translated selected from among the target character and the character to be translated, step C3 is performed.
Step C3: and keeping the selected character displayed.
After receiving a target character or a character to be translated selected from among the target character and the character to be translated, the selected character may be displayed in a reserved manner, specifically, the selected character may be displayed in a reserved manner in a character document, or the selected character may be displayed in a conversation box, or the like.
According to the embodiment of the application, after the character translation is carried out, the original character and the translated character are displayed for the user to select, the translated character cannot be directly reserved and displayed, the autonomous selectivity of the user can be improved, and the user experience is improved.
Of course, in practical applications, for the character to be translated and the translated target character, the user may not select, but directly display the character to be translated, the target character, and the separator for dividing the character to be translated and the target character, in this example, the separator may be a space, a bracket, or the like, for example, the character to be translated is an "element", the translated target character is an "element", and after the translation is completed, the character to be translated, the target character, and the space added between the character to be translated and the target character, such as an element, may be simultaneously displayed in the character document. Alternatively, a character to be translated, a target character, and a bracket for dividing the character to be translated and the target character, such as an element, are displayed simultaneously in the character document.
In this embodiment, after obtaining the target character, the target character may be displayed by touching the target control, and specifically, the following detailed description may be performed in combination with the following specific implementation manner.
In another specific implementation manner of the present application, after the step 103, the method may further include:
step D1: and receiving touch operation on the target control.
In this embodiment, the target control refers to a control for displaying the translated character, and in this example, the target control may be a space bar, a "Ctrl" key, or the like.
After the target character is obtained, a touch operation of the user on the target control can be received.
And executing the step D2 after receiving the touch operation of the target control.
Step D2: and responding to the touch operation, and displaying the target character.
After receiving the touch operation on the target control, the target character may be displayed in response to the touch operation, and specifically, after receiving the touch operation on the target control, the target character may be displayed in a character document, the target character may be displayed in a dialog box, and the like.
According to the method and the device, the target characters can be selectively displayed by the touch of the user on the target control, the user does not need to execute copying and pasting operations, the user operation is facilitated, and the user experience is improved.
In this embodiment, when the target character obtained by translation may have multiple target characters, at this time, a user may select a character to be retained from the multiple target characters, and specifically, the following detailed description may be made in conjunction with the following specific implementation manner.
In another specific implementation manner of the present application, after the step 103, the method may further include:
step F1: and displaying the target character.
In this embodiment, when there are a plurality of target characters, a plurality of target characters may be displayed, for example, when the character to be translated is a chinese character, one chinese character may correspond to a plurality of english translations, and if the character to be translated is a "picture", the english translation corresponding to the character to be translated includes: "picture" and "photograph", and the like.
After the target character is obtained, the target character may be displayed, specifically, the target character may be displayed in a form of a pop-up window, or the target character may be displayed in a form of a list.
After the target character is displayed, step F2 is performed.
Step F2: a character selected from the target characters is received.
After the target characters are displayed, the user may select the characters that need to be retained for display from the target characters, for example, taking advantage of the above example in step F1, the displayed target characters are two, that is, "picture" and "photograph", and at this time, the user may select the target characters that need to be retained for display from the two target characters, and the like.
After receiving the character selected from the target characters, step F3 is performed.
Step F3: and keeping the selected character displayed.
After receiving the character selected from the target character, the selected character may be displayed in a reserved manner, specifically, the selected character may be displayed in a reserved manner in the character document, or the selected character may be displayed in the dialog box.
According to the embodiment of the application, when a plurality of target characters are obtained through translation, the plurality of target characters can be displayed for a user to select, the autonomous selectivity of the user can be improved, and the accuracy of character translation is improved.
According to the translation method provided by the embodiment of the application, whether a translation identifier exists in the input characters or not is determined, the characters to be translated in the characters are determined based on the translation identifier, wherein the translation identifier corresponds to a target language, and the characters to be translated are translated into the target language to obtain the target characters. According to the method and the device, the translation identifier is input into the input character by the user, the character to be translated and the target language can be identified through the translation identifier, so that the translation operation of the character to be translated is realized, the user does not need to open a webpage or a translation tool and the like to translate the character, the character translation time is saved, and the user experience is improved.
Example two
An embodiment of the present application further provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program implementing the translation method described above when executed by the processor.
Fig. 3 shows a schematic structural diagram of an electronic device 300 according to an embodiment of the present invention. As shown in fig. 3, electronic device 300 includes a Central Processing Unit (CPU) 301 that may perform various suitable actions and processes in accordance with computer program instructions stored in a Read Only Memory (ROM) 302 or loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM303, various programs and data necessary for the operation of the electronic apparatus 300 can also be stored. The CPU301, ROM302, and RAM303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
A number of components in the electronic device 300 are connected to the I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, a microphone, and the like; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the electronic device 300 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The various processes and processes described above may be performed by processing unit 301. For example, the methods of any of the above embodiments may be implemented as a computer software program tangibly embodied on a computer-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 300 via the ROM302 and/or the communication unit 309. When the computer program is loaded into RAM303 and executed by CPU301, one or more acts of the methods described above may be performed.
EXAMPLE III
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when being executed by a processor, the computer program implements each process of the translation method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed in the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A method of translation, comprising the steps of:
determining whether a translation identifier exists in the input characters;
determining a character to be translated in the characters based on the translation identifier, wherein the translation identifier corresponds to a target language;
and translating the character to be translated into the target language to obtain a target character.
2. The method of claim 1, the determining a character to be translated of the characters based on the translation identifier, comprising:
and acquiring the rest characters except the translation identifier in the input characters, and taking the rest characters as the characters to be translated.
3. The method of claim 1, the determining a character to be translated among the characters based on the translation identifier, comprising:
acquiring a symbol identifier added in an input character;
determining a character to be translated among the characters based on the symbol identifier.
4. The method of claim 1, further comprising the steps of:
acquiring an initial language corresponding to the character to be translated;
the step of translating the character to be translated into the target language to obtain a target character comprises the following steps:
and translating the character to be translated from the initial language to the target language to obtain the target character.
5. The method according to claim 4, wherein the obtaining of the initial language corresponding to the character to be translated comprises the following steps:
acquiring the language of an input method for inputting characters, and taking the language of the input method as the initial language; or
And acquiring a system language, and taking the system language as the initial language.
6. The method according to claim 1, further comprising the following steps after translating the character to be translated into the target language to obtain a target character:
displaying the target character and the character to be translated;
receiving the target character or the character to be translated selected from the target character and the character to be translated;
and keeping the selected character displayed.
7. The method according to claim 1, further comprising the following steps after translating the character to be translated into the target language to obtain a target character:
receiving touch operation on a target control;
and responding to the touch operation, and displaying the target character.
8. The method according to claim 1, further comprising the following steps after translating the character to be translated into the target language to obtain a target character:
displaying the target character;
receiving a character selected from the target characters;
and keeping the selected character displayed.
9. An electronic device, comprising:
memory, processor and computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the translation method according to any of claims 1 to 8.
10. A readable storage medium, wherein instructions in the readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the steps of the translation method of any of claims 1 to 8.
CN202110716490.5A 2021-06-25 2021-06-25 Translation method, electronic device and readable storage medium Pending CN115526186A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110716490.5A CN115526186A (en) 2021-06-25 2021-06-25 Translation method, electronic device and readable storage medium
PCT/CN2021/139671 WO2022267394A1 (en) 2021-06-25 2021-12-20 Translation method, and electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110716490.5A CN115526186A (en) 2021-06-25 2021-06-25 Translation method, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN115526186A true CN115526186A (en) 2022-12-27

Family

ID=84544986

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110716490.5A Pending CN115526186A (en) 2021-06-25 2021-06-25 Translation method, electronic device and readable storage medium

Country Status (2)

Country Link
CN (1) CN115526186A (en)
WO (1) WO2022267394A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116702801B (en) * 2023-08-07 2024-04-05 深圳市微星智造科技有限公司 Translation method, device, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9760624B1 (en) * 2013-10-18 2017-09-12 Google Inc. Automatic selection of an input language
CN107665046B (en) * 2016-07-29 2023-03-10 北京搜狗科技发展有限公司 Input method and device and input device
CN107957994A (en) * 2017-10-30 2018-04-24 努比亚技术有限公司 A kind of interpretation method, terminal and computer-readable recording medium
CN111209755A (en) * 2019-12-25 2020-05-29 广东飞企互联科技股份有限公司 Efficient translation method

Also Published As

Publication number Publication date
WO2022267394A1 (en) 2022-12-29

Similar Documents

Publication Publication Date Title
KR101942308B1 (en) Method for providing message function and an electronic device thereof
US9641471B2 (en) Electronic device, and method and computer-readable recording medium for displaying message in electronic device
KR101271285B1 (en) A method of providing a multi language translation for messages included in chatting window
JP6032713B2 (en) Electronic device and data processing method thereof
EP2980737A1 (en) Method, apparatus, and system for providing translated content
US20070143410A1 (en) System and method for defining and translating chat abbreviations
KR20140092873A (en) Adaptive input language switching
US9560188B2 (en) Electronic device and method for displaying phone call content
US8219628B2 (en) Method to change instant messaging status based on text entered during conversation
US11295064B2 (en) Method for transmitting information at user device side and network device side
CN105635444A (en) Contact person information sharing method and terminal
CN112559672B (en) Information detection method, electronic device and computer storage medium
CN106598409B (en) Text copying method and device and intelligent terminal
KR101567555B1 (en) Social network service system and method using image
CN112965781A (en) Method and device for processing page
WO2014062451A1 (en) Contextually-specific automatic separators
EP2790103A1 (en) Electronic apparatus and copy control program
CN110519155B (en) Information processing method and system
CN101894021A (en) Method and system for realizing interface of embedded system
KR20150088806A (en) Using custom rtf commands to extend chat functionality
CN115526186A (en) Translation method, electronic device and readable storage medium
CN110134920B (en) Pictogram compatible display method, device, terminal and computer readable storage medium
WO2019196645A1 (en) Conversational information processing method, device, mobile terminal, and storage medium
EP2555127A2 (en) Display apparatus for translating conversations
CN106775249B (en) Method for setting communication shortcut and electronic equipment

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