Method and system for processing multi-language resource file of client

By obtaining and parsing the metadata information of the language file, automatically generating the files to be translated and translated files, the problems of large workload and high error rate caused by manual translation are solved, and efficient and accurate language resource file updates and generation are achieved.

CN120146067APending Publication Date: 2025-06-13GUANGZHOU CORESING ROBOT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510154143.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

During the client development process, when adding new translated text or supporting new languages, manual translation is required, which leads to large workload, long time-consuming, and prone to text position errors, affecting the security and user experience of the product.

Method used

By obtaining the metadata information, text information and identification information of the language file, the files to be translated and the translation files are automatically generated, and the identification information is used for accurate storage and update, and automated language resource file processing is realized.

Benefits of technology

It improves the efficiency and accuracy of the update generation of language resource files, reduces labor waste, and avoids errors and redundant work in manual translation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146067A_ABST
    Figure CN120146067A_ABST
Patent Text Reader

Abstract

The invention provides a client multi-language resource file processing method. The client multi-language resource file processing method comprises the steps of obtaining metadata information, text information and identification information based on a preset analysis mode and a language file; when the language file meets the first import condition, obtaining a to-be-translated worksheet based on the metadata information, the text information, the identification information and a preset write-in rule, obtaining a to-be-translated file based on the to-be-translated worksheet, and then obtaining a translated file based on the to-be-translated file; obtaining write-in metadata information, write-in text information and write-in identification information based on the translated file, and when it is determined that the write-in identification information is consistent with the identification information, updating the to-be-written worksheet based on the write-in text information, the write-in identification information and a corresponding preset write-in rule; and based on the write-in metadata information, the to-be-written worksheet and the corresponding preset analysis mode, obtaining a generated language file. According to the client multi-language resource file processing method and system provided by the invention, the update generation efficiency of the language resource file is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and system for processing multi-language resource files of a client. Background Art

[0002] Currently, during the development of a client, when new translation texts are added to the language resource file or a new language is to be supported, only the processing personnel can perform the translation of the texts, and it is a manual translation, such as manually querying and then copying and pasting. The workload is large and extremely time-consuming. If the processing personnel are slightly careless or negligent, it is very easy to cause errors in the text position. When the user uses it, it may trigger an incorrect function of the product, which may cause potential safety hazards. Therefore, there is an urgent need for a method step that can be used to automatically process multi-language resource files of a client to improve the update generation efficiency and accuracy of the language resource file and reduce waste of manpower. Summary of the Invention

[0003] The present invention aims to provide a method and system for processing multi-language resource files of a client to solve the above technical problems and effectively improve the update generation efficiency and accuracy of the language resource file.

[0004] To solve the above technical problems, the present invention provides a method for processing multi-language resource files of a client, including the following steps:

[0005] Obtain a language file, and obtain metadata information, text information, and identification information based on a preset parsing method and the language file;

[0006] When the language file meets the first import condition, obtain a worksheet to be translated based on the metadata information, text information, identification information, and a preset writing rule, obtain a file to be translated based on the worksheet to be translated, and then obtain a translation file based on the file to be translated;

[0007] Obtain writing metadata information, writing text information, and writing identification information based on the translation file. When it is determined that the writing identification information and the identification information are consistent, update the worksheet to be written based on the writing text information, writing identification information, and the corresponding preset writing rule;

[0008] Obtain a generated language file based on the writing metadata information, the worksheet to be written, and the corresponding preset parsing method, and realize the update and generation of the multi-language resource file of the client.

[0009] The above solution obtains relevant information by parsing the language file, and obtains the key information of the corresponding language file through metadata information. Then, the required translation text with identification information is written into the worksheet to generate the file to be translated automatically. The file to be translated is marked and stored through the uniqueness of the identification information corresponding to each different piece of information, without the need to select one by one, effectively improving the generation efficiency and accuracy of the file to be translated. After obtaining the translation file, the relevant information of the file is parsed again, so that the reverse writing and updating are directly performed at the corresponding positions through the relevant information of the translation file. Thus, the update and generation of the client language file are completed, effectively improving the update and generation efficiency and accuracy of the language resource file.

[0010] Further, it also includes: when the language file does not meet the first import condition, obtaining the corresponding worksheet based on the metadata information; obtaining the original text information based on the corresponding worksheet, so as to obtain the new text item based on the text information and the original text information; obtaining the worksheet to be translated based on the new text item, the identification information, the corresponding worksheet and the preset writing rule; obtaining the file to be translated based on the worksheet to be translated, and then obtaining the translation file based on the file to be translated.

[0011] In the above solution, for the language file that is not imported for the first time, the corresponding worksheet is found through matching its metadata information, and the text information of the language file is compared with the original text information in the corresponding worksheet to find the new text items that are not in the original corresponding worksheet and need to be newly added. Then, the new text items are added to the corresponding worksheet through the preset writing rule to generate the worksheet to be translated, without the need for manual search and comparison. The file to be translated is generated according to the same data storage import and export rules, which is efficient and provides accurate file information for the subsequent update and generation of the language file.

[0012] Further, after obtaining the corresponding worksheet based on the metadata information when the language file does not meet the first import condition, it also includes: obtaining the original text information based on the corresponding worksheet, so as to obtain the different text item and the different position information based on the text information and the original text information; updating the corresponding worksheet by using the different text item and the identification information based on the different position information to obtain the worksheet to be translated.

[0013] In the above solution, when the original text information contains the text information that is the same as the identification information in the language file, it is necessary to find the different position information and replace the different text item with the original text information to update the corresponding worksheet, so as to obtain the file to be translated.

[0014] Further, a worksheet to be translated is obtained based on metadata information, new text items, identification information, and a preset writing rule, a file to be translated is obtained based on the worksheet to be translated, and then a translation file is obtained based on the file to be translated. It further includes: obtaining new language items, obtaining a worksheet to be translated based on metadata information, new text items, identification information, new language items, and a preset writing rule, obtaining a file to be translated based on the worksheet to be translated, and then obtaining a translation file based on the file to be translated.

[0015] In the above solution, new language items can also be added to the file to be translated. When a new language type needs to be added, only the desired language needs to be selected in the built-in language library to import the new language items, without regenerating the file to be translated.

[0016] Further, a generated language file is obtained based on the written metadata information, the worksheet to be written, and the corresponding preset parsing method to update and generate the client multi-language resource file, including: creating a language folder according to a preset classification method; obtaining the corresponding preset parsing method, and obtaining a generated language file in the language folder based on the written metadata information, the worksheet to be written, the preset classification method, and the corresponding preset parsing method.

[0017] In the above solution, for the translation file, the written metadata information is obtained through a file parsing method, so as to perform corresponding writing at the corresponding position of the worksheet to be written in the language folder, thereby obtaining a generated language file, and updating and generating based on the corresponding preset parsing methods of different language files, which greatly improves the update and generation efficiency and accuracy of the language resource file.

[0018] A method for processing a client multi-language resource file provided by the present invention obtains relevant information by parsing a language file, obtains key information of the corresponding language file through metadata information, and then writes the required translation text with identification information into the worksheet. For new text items, they are directly added to the corresponding worksheet, and for different text items, the text information at different positions is replaced. New language items can be automatically added, and a file to be translated can be generated by itself. It is marked and stored through the uniqueness of the identification information corresponding to each different piece of information, without the need for one-to-one selection, effectively improving the generation efficiency and accuracy of the file to be translated; after obtaining the translation file, the relevant information of the file is parsed again, so that reverse writing and updating are directly performed at the corresponding position through the relevant information of the translation file. Thus, the update and generation of the client language file are completed, and multiple language resource files supporting multiple languages can be automatically generated, solving the problems of large workload and redundancy in manual translation work and effectively improving work efficiency.

[0019] The present invention also provides a processing system for a client multi-language resource file, which is implemented by using a method for processing a client multi-language resource file, including:

[0020] A parsing module, configured to obtain a language file and acquire metadata information, text information, and identification information based on a preset parsing method and the language file;

[0021] A reading and writing module, configured to, when the language file meets the first import condition, obtain a worksheet to be translated based on the metadata information, text information, identification information, and a preset writing rule, acquire a file to be translated based on the worksheet to be translated, and further acquire a translated file based on the file to be translated;

[0022] A generating module, configured to obtain written metadata information, written text information, and written identification information based on the translated file, when determining that the written identification information is consistent with the identification information, update the worksheet to be written based on the written text information, written identification information, and the corresponding preset writing rule; acquire a generated language file based on the written metadata information, the worksheet to be written, and the corresponding preset parsing method, so as to update and generate a multi-language resource file of a client.

[0023] The above solution parses the language file through the parsing module to obtain relevant information, and obtains the key information of the corresponding language file through the metadata information. Then, the reading and writing module writes the required translation text with identification information into the worksheet, generates the file to be translated by itself, and performs marked storage through the uniqueness of the identification information corresponding to each different piece of information, without the need for one-to-one selection, effectively improving the generation efficiency and accuracy of the file to be translated. Finally, after the generating module obtains the translated file, it parses the relevant information of the file again, so as to directly perform reverse writing and updating at the corresponding position through the relevant information of the translated file, thus completing the update and generation of the client language file, effectively improving the update and generation efficiency and accuracy of the language resource file.

[0024] Further, it further includes: a comparison module, configured to, when the language file does not meet the first import condition, acquire the corresponding worksheet based on the metadata information, acquire the original text information based on the corresponding worksheet, and further acquire new text items based on the text information and the original text information, so that the reading and writing module acquires the worksheet to be translated based on the new text items, identification information, the corresponding worksheet, and the preset writing rule, so that the reading and writing module acquires the file to be translated based on the worksheet to be translated, and further the reading and writing module acquires the translated file based on the file to be translated.

[0025] In the above solution, for language files that are not imported for the first time, the comparison module matches and finds the corresponding worksheet according to its metadata information, compares the text information of the language file with the original text information in the corresponding worksheet, finds new text items that are not in the original corresponding worksheet and need to be newly added, and then the reading and writing module adds the new text items to the corresponding worksheet according to the preset writing rules to generate a worksheet to be translated. There is no need for manual searching and comparison, and the generation of the file to be translated is achieved according to the same data storage import and export rules, which is efficient and provides accurate file information for the subsequent update and generation of language files.

[0026] Furthermore, the comparison module is also used to: obtain the original text information based on the corresponding worksheet, so as to obtain the differential text items and differential position information based on the text information and the original text information, so that the reading and writing module updates the corresponding worksheet using the differential text items and identification information based on the differential position information, so that the reading and writing module obtains the worksheet to be translated.

[0027] In the above solution, when the original text information contains text information identical to the identification information in the language file, the comparison module finds the differential position information and replaces the differential text items with the original text information to update the corresponding worksheet, thereby obtaining the file to be translated.

[0028] Furthermore, it also includes: a language module, which is used to obtain new language items, so that the reading and writing module obtains the worksheet to be translated based on the metadata information, new text items, identification information, new language items and preset writing rules, so that the reading and writing module obtains the file to be translated based on the worksheet to be translated, and further enables the reading and writing module to obtain the translation file based on the file to be translated.

[0029] In the above solution, new language items can also be added to the file to be translated through the language module. When a new language type needs to be added, only the language to be added needs to be selected in the built-in language library to import the new language items, and there is no need to regenerate the file to be translated.

[0030] Furthermore, the generation module includes an update sub-module, a creation sub-module and a generation and parsing sub-module, where: the update sub-module is used to obtain the writing metadata information, writing text information and writing identification information based on the translation file. When it is determined that the writing identification information is consistent with the identification information, it updates the worksheet to be written based on the writing text information, writing identification information and corresponding preset writing rules; the creation sub-module is used to create a language folder according to the preset classification method; the generation and parsing sub-module is used to obtain the corresponding preset parsing method, and obtain the generated language file in the language folder based on the writing metadata information, the worksheet to be written, the preset classification method and the corresponding preset parsing method.

[0031] In the above solution, for the translation file, the generation module obtains the written metadata information through file parsing, so as to correspond and write to the corresponding position of the worksheet to be written in the language folder, thereby obtaining the generated language file, and performing update generation based on the corresponding preset parsing methods of different language files, which greatly improves the update generation efficiency and accuracy of the language resource file.

[0032] A processing system for client multi-language resource files provided by the present invention parses the language file through a parsing module to obtain relevant information, and obtains the key information of the corresponding language file through the metadata information. Furthermore, the required translation text with identification information is written into the worksheet through a reading and writing module, and new text items, differential text items, etc. are obtained through a comparison file. For new text items, they are directly added to the corresponding worksheet, and for differential text items, the text information at the differential position is replaced. Moreover, new language items can be automatically added, and a file to be translated can be automatically generated, and it is marked and stored through the uniqueness of the identification information corresponding to each different piece of information, without the need for one-to-one selection, effectively improving the generation efficiency and accuracy of the file to be translated; after obtaining the translation file, the relevant information of the file is parsed again through the generation module, so as to directly perform reverse writing and updating at the corresponding position through the relevant information of the translation file. Thus, the update generation of the client language file is completed, and various language resource files supporting multiple languages can be automatically generated, solving the problems of large workload and redundancy in manual translation work and effectively improving the work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 It is a schematic diagram of a method for processing client multi-language resource files provided by an embodiment of the present invention;

[0034] Figure 2 It is a schematic flowchart of a method for processing client multi-language resource files provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0035] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present invention.

[0036] Embodiment 1:

[0037] This embodiment provides a method for processing client multi-language resource files, as Figure 1 shown, including the following steps:

[0038] S1: Obtain a language file, and obtain metadata information, text information, and identification information based on a preset parsing method and the language file;

[0039] S2: When the language file meets the first import condition, obtain a worksheet to be translated based on the metadata information, text information, identification information, and a preset writing rule, so as to obtain a file to be translated based on the worksheet to be translated, and then obtain a translation file based on the file to be translated;

[0040] S3: Obtain writing metadata information, writing text information, and writing identification information based on the translation file. When it is determined that the writing identification information is consistent with the identification information, update the worksheet to be written based on the writing text information, writing identification information, and the corresponding preset writing rule;

[0041] S4: Obtain a generated language file based on the writing metadata information, the worksheet to be written, and the corresponding preset parsing method, and realize the update and generation of the client multi-language resource file.

[0042] The above solution parses the language file to obtain relevant information, and obtains the key information of the corresponding language file through the metadata information. Then, the required translation text with identification information is written into the worksheet, and the file to be translated is generated automatically. It is marked and stored through the uniqueness of the identification information corresponding to each different piece of information, without the need to select one by one, effectively improving the generation efficiency and accuracy of the file to be translated; after obtaining the translation file, parse the relevant information of the file again, so as to directly perform reverse writing and updating at the corresponding position through the relevant information of the translation file. Thus, the update and generation of the client language file are completed, effectively improving the update and generation efficiency and accuracy of the language resource file.

[0043] In the specific implementation process, different language files have different structural characteristics, which encapsulate different data structure objects. Select the corresponding preset parsing method according to different structural characteristics to parse language files with different structures to obtain metadata information; after obtaining the metadata information, store it. The metadata information depends on different file structures. For example: the metadata information of a language file may only include serial number 1, serial number 2, and text information, while the metadata information of another language file includes ID, ADDR, OFFSET, STATUSADDR, STATUSOFFSET, VISIBLE, and text information, or includes INDEX, BYTES, VISIBLE, text information, etc. After parsing the selected file, extract these key metadata information and write it into the temporary cache for subsequent use.

[0044] Optionally, it further includes: when the language file does not meet the first import condition, obtaining the corresponding worksheet based on the metadata information; obtaining the original text information based on the corresponding worksheet, so as to obtain new text items based on the text information and the original text information; obtaining the worksheet to be translated based on the new text items, identification information, the corresponding worksheet, and a preset writing rule; obtaining the file to be translated based on the worksheet to be translated, and then obtaining the translation file based on the file to be translated.

[0045] Optionally, after obtaining the corresponding worksheet based on the metadata information when the language file does not meet the first import condition, it further includes: obtaining the original text information based on the corresponding worksheet, so as to obtain the different text items and different position information based on the text information and the original text information; updating the corresponding worksheet based on the different text items, identification information, and different position information, and obtaining the worksheet to be translated.

[0046] In the specific implementation process, in this embodiment, the Excel file is used as the carrier of data. The metadata in the temporary cache is written into the Excel file according to different structural characteristics and different writing rules. Different files are distinguished by different worksheet names. When writing the file metadata information into the Excel file, only the identification information (unique identification ID) and text information need to be written, and other items can be skipped if there is no need to modify. At the same time, some key information in the metadata information is written into the database for convenient subsequent operations. The information in the database includes the source file path, the serial number of the preset parsing method used, the serial number of the preset writing rule used, etc. When a new text item is added to a certain language file and it is re-imported at this time, first, according to the previous worksheet naming rule, check whether there is a worksheet with the same name. If so, read the data of the worksheet according to the previous preset writing rule, compare it with the metadata in the temporary cache, find the new text items, and add them to the end of the worksheet. When different text items are found, modify them at the corresponding positions in the Excel file according to the different position information, and highlight (such as highlighting, shading, etc.) the newly added or modified parts. After completing the above steps, the processing personnel can perform the translation work of the corresponding text in different columns according to the position of the source text in different worksheets of the Excel file. After importing the text items into the Excel file, the translator only needs to focus on the translation of the text items in different languages, and deliver the file to the processing personnel after completion, achieving an efficient separation of job responsibilities.

[0047] Optionally, obtain a worksheet to be translated based on metadata information, new text items, identification information, and a preset writing rule, obtain a file to be translated based on the worksheet to be translated, and then obtain a translation file based on the file to be translated. It further includes: obtaining a new language item, obtaining a worksheet to be translated based on metadata information, new text items, identification information, the new language item, and a preset writing rule, obtaining a file to be translated based on the worksheet to be translated, and then obtaining a translation file based on the file to be translated.

[0048] In the specific implementation process, new language items can also be added to the file to be translated. When the client needs to add a new language type, it mainly includes the names and abbreviations of various overseas languages. Just check the languages to be added in the built-in language library to import the new language items. After checking, the selected language types will be displayed in the form of "The following languages will be added to the current xlsx file", and at the same time, the existing translated languages in the current xlsx file (language resource file) will also be displayed, facilitating the client's operation and selection.

[0049] Optionally, obtain a generated language file based on the written metadata information, the worksheet to be written, and the corresponding preset parsing method to implement the update and generation of the client's multi-language resource file, including: creating a language folder according to the preset classification method; obtaining the corresponding preset parsing method, and obtaining a generated language file in the language folder based on the written metadata information, the worksheet to be written, the preset classification method, and the corresponding preset parsing method.

[0050] In the specific implementation process, for translation files, first, according to the worksheet names of different translation files, query the corresponding preset writing rule numbers stored in the database, and use different reading rules to read the translation texts in different languages corresponding to the text items to be written into the Excel file by rows and columns. Write this written text information into the temporary cache according to rules such as worksheet name and language classification; then query the source file path in the database, obtain the written metadata information through file parsing, and compare the obtained written metadata information according to identification information such as ID and INDEX. If the results are consistent, replace the translation text to the worksheet to be written; then create folders classified by multi-language names in the specified folder. For example, the folder for storing Japanese is named ja, and the folder for storing Russian is named ru; finally, query the corresponding preset parsing method in the database, regenerate data with the same structure as the source file but different text information and write it into the file, and store it in the folder named by language. When a language file contains serial number 1, serial number 2, and literal text, each item generates text data in the format of "[serial number 1][serial number 2]text" and then writes it into the file; when a language file is in XML format and the metadata information contains ID, ADDR, OFFSET, STATUSADDR, STATUSOFFSET, VISIBLE, and literal text, each item generates text data in the format of "ID = "data" ADDR = "data" OFFSET = "data" STATUSADDR = "data" STATUSOFFSET = "data" VISIBLE = "data" <item>Text< / item> ", and so on. The structure of each different language resource file has a corresponding rule, so as to obtain the generated language file corresponding to the rule, and update and generate it based on the corresponding preset parsing method of different language files, which greatly improves the update and generation efficiency and accuracy of language resource files.

[0051] At the same time, in the specific implementation process, in the processing method for updating and generating multi-language resource files on the client side, the written identification information includes different language identifications and a certain value in the metadata structure of different language resource files that can be used as identification information, such as serial number, ID, INDEX, etc.; the text information of the corresponding language for reading the Excel file is the text visually seen, and the influence of the function formula written in the cell on the read data is excluded.

[0052] A method for processing client multi - language resource files provided in this embodiment obtains relevant information by parsing language files, and obtains key information of corresponding language files through metadata information. Then, the required translation text with identification information is written into a worksheet. For new text items, they are directly added to the corresponding worksheet. For different text items, the text information at the different positions is replaced. Moreover, new language items can be automatically added, and a file to be translated can be generated automatically. It is marked and stored through the uniqueness of the identification information corresponding to each different piece of information, without the need for one - to - one corresponding selection, effectively improving the generation efficiency and accuracy of the file to be translated. After obtaining the translation file, the relevant information of the file is parsed again, so that reverse writing and updating are directly carried out at the corresponding positions through the relevant information of the translation file. Thus, the update and generation of the client language file are completed, and multiple language resource files supporting multiple languages can be automatically generated, solving the problems of large workload and redundancy in manual translation work and effectively improving work efficiency.

[0053] Embodiment Two:

[0054] This embodiment provides a processing system for client multi - language resource files, which is implemented by using a method for processing client multi - language resource files, and includes:

[0055] A parsing module, configured to obtain a language file, and obtain metadata information, text information, and identification information based on a preset parsing method and the language file;

[0056] A reading and writing module, configured to obtain a worksheet to be translated based on the metadata information, text information, identification information, and a preset writing rule when the language file meets the first - import condition, obtain a file to be translated based on the worksheet to be translated, and then obtain a translation file based on the file to be translated;

[0057] A generation module, configured to obtain writing metadata information, writing text information, and writing identification information based on the translation file. When it is determined that the writing identification information is consistent with the identification information, update the worksheet to be written based on the writing text information, writing identification information, and the corresponding preset writing rule; obtain a generated language file based on the writing metadata information, the worksheet to be written, and the corresponding preset parsing method, so as to realize the update and generation of the client multi - language resource file.

[0058] The above solution parses the language file through the parsing module to obtain relevant information, and obtains the key information of the corresponding language file through the metadata information. Then, the reading and writing module writes the required translation text with identification information into the worksheet, generates the file to be translated by itself, and marks and stores it through the uniqueness of the identification information corresponding to each different piece of information, without the need to select one by one, effectively improving the generation efficiency and accuracy of the file to be translated. After the generation module obtains the translation file, it parses the relevant information of the file again, and directly performs reverse writing and updating at the corresponding position through the relevant information of the translation file, thus completing the update and generation of the client language file, effectively improving the update and generation efficiency and accuracy of the language resource file.

[0059] Optionally, it further includes: a comparison module, which is used to obtain the corresponding worksheet based on the metadata information when the language file does not meet the first import condition, so as to obtain the original text information based on the corresponding worksheet, and then obtain the new text items based on the text information and the original text information, so that the reading and writing module obtains the worksheet to be translated based on the new text items, identification information, the corresponding worksheet and the preset writing rules, so that the reading and writing module obtains the file to be translated based on the worksheet to be translated, and further enables the reading and writing module to obtain the translation file based on the file to be translated.

[0060] In the specific implementation process, according to the characteristics of language resource files with different structures, different data structure objects are correspondingly encapsulated to store the metadata information obtained by parsing language resource files with different structures. The core operation method for parsing the language file, that is, the preset parsing method, is encapsulated in the parsing module. The parsing module mainly includes parsing methods and parsing results for language resource files with different structures. The comparison module encapsulates the core operation method for comparing the metadata information of language files with the same structure. The reading and writing module encapsulates the core operation methods for writing text information into an Excel file and reading text data from an Excel file, that is, the preset writing rules, including writing the specified text information data into the cells of the specified rows and columns, and also includes the reading operation, that is, reading the text information data of the cells of the specified rows and columns. The generation module encapsulates the core operation method for generating different language files by writing the read write metadata information that can be written into a file, that is, the preset writing rules.

[0061] Optionally, the comparison module is further used to: obtain the original text information based on the corresponding worksheet, so as to obtain the different text items and different position information based on the text information and the original text information, so that the reading and writing module updates the corresponding worksheet based on the different text items, identification information and the different position information, so that the reading and writing module obtains the worksheet to be translated.

[0062] In the specific implementation process, when the original text information contains the same text information as the identification information in the language file, the comparison module is used to find the difference position information, and the different text items are replaced with the original text information to update the corresponding worksheet, so as to obtain the file to be translated.

[0063] Optionally, it further includes: a language module, which is used to obtain new language items, so that the reading and writing module can obtain the worksheet to be translated based on the metadata information, new text items, identification information, new language items and preset writing rules, so that the reading and writing module can obtain the file to be translated based on the worksheet to be translated, and further enable the reading and writing module to obtain the translation file based on the file to be translated.

[0064] In the specific implementation process, the language module encapsulates the language library built in for adding new languages, which mainly includes the names and abbreviations of various overseas languages.

[0065] Optionally, the generation module includes an update sub-module, a creation sub-module and a generation parsing sub-module, where: the update sub-module is used to obtain the write metadata information, write text information and write identification information based on the translation file. When it is determined that the write identification information is consistent with the identification information, the worksheet to be written is updated based on the write text information, write identification information and corresponding preset writing rules; the creation sub-module is used to create language folders according to the preset classification method; the generation parsing sub-module is used to obtain the corresponding preset parsing method, and obtain the generated language file in the language folder based on the write metadata information, the worksheet to be written, the preset classification method and the corresponding preset parsing method.

[0066] In the specific implementation process, for the translation file, the generation module obtains the write metadata information through the file parsing method, so as to perform corresponding writing at the corresponding position of the worksheet to be written in the language folder, so as to obtain the generated language file, and perform update generation based on the corresponding preset parsing methods of different language files, which greatly improves the update generation efficiency and accuracy of the language resource file.

[0067] A processing system for client multi - language resource files provided in this embodiment parses the language file through a parsing module to obtain relevant information, and obtains the key information of the corresponding language file through metadata information. Then, through a reading and writing module, the required translation text with identification information is written into a worksheet. By comparing files, new text items, different text items, etc. are obtained. For new text items, they are directly added to the corresponding worksheet, and for different text items, the text information at the different positions is replaced. Moreover, new language items can be automatically added, and a file to be translated can be generated automatically. It is marked and stored through the uniqueness of the identification information corresponding to each different piece of information, without the need to select one - by - one, effectively improving the generation efficiency and accuracy of the file to be translated. After obtaining the translation file, the relevant information of the file is parsed again through a generation module, and then the reverse writing and updating are directly carried out at the corresponding positions through the relevant information of the translation file. Thus, the update and generation of the client language file are completed, and multiple language resource files supporting multiple languages can be automatically generated, solving the problems of large workload and redundancy in manual translation work and effectively improving work efficiency.

[0068] Embodiment Three:

[0069] This embodiment provides a processing flow for client multi - language resource files, which is implemented by the method of Embodiment One. As Figure 2 shown, it includes the following steps:

[0070] S31: Obtain the language file, and store the metadata information, text information, and identification information based on the preset parsing method and the language file.

[0071] S32: Determine whether the language file meets the first - import condition. When the language file meets the first - import condition, execute step S33; when the language file does not meet the first - import condition, execute step S330.

[0072] S330: Obtain the corresponding worksheet based on the metadata information; obtain the original text information based on the corresponding worksheet, so as to obtain the text information to be written based on the text information and the original text information.

[0073] S331: Add new language items to the file to be translated.

[0074] S33: Obtain the worksheet to be translated based on the text information to be written, identification information, new language items, and the preset writing rules.

[0075] S34: Obtain the file to be translated based on the worksheet to be translated, and then obtain the translation file based on the file to be translated.

[0076] S35: Obtain the writing metadata information, writing text information, and writing identification information based on the translation file.

[0077] S36: When it is determined that the written identification information is consistent with the identification information, update the worksheet to be written based on the written text information, the written identification information, and the corresponding preset writing rules;

[0078] S37: Create language folders according to the preset classification method;

[0079] S38: Obtain and generate language files in the language folders based on the written metadata information, the worksheet to be written, and the corresponding preset parsing method, so as to update and generate the multi-language resource files of the client.

[0080] The above is the preferred embodiment of the present invention. It should be noted that for those of ordinary skill in the art of this technology, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.

Claims

1. A method for processing multi-language resource files on a client, characterized in that: The following steps are involved: Obtaining a language file, and obtaining metadata information, text information, and identification information based on a preset parsing method and the language file; When the language file meets the first import condition, a work list to be translated is obtained based on metadata information, text information, identification information and preset writing rules, so as to obtain a file to be translated based on the work list to be translated, and then obtain a translation file based on the file to be translated; Acquire write metadata information, write text information and write identification information based on the translation file, and when it is determined that the write identification information and the identification information are consistent, update the to-be-written work table based on the write text information, the write identification information and the corresponding preset write rules; Based on the written metadata information, the worksheet to be written and the corresponding preset parsing method, the generated language file is obtained to realize the update and generation of the client's multi-language resource file.

2. A method for processing multi-language resource files on a client according to claim 1, characterized in that: When the language file meets the first import condition, a work table to be translated is obtained based on metadata information, text information, identification information and preset writing rules, so as to obtain a file to be translated based on the work table to be translated, and then obtain a translation file based on the file to be translated, further comprising: When the language file does not meet the first import condition, obtaining a corresponding worksheet based on metadata information; Obtaining original text information based on the corresponding worksheet to obtain new text items based on the text information and the original text information; Obtaining a worksheet to be translated based on the new text item, identification information, corresponding worksheet and preset writing rules; The to-be-translated file is obtained based on the to-be-translated work list, and then the translation file is obtained based on the to-be-translated file.

3. A method for processing multi-language resource files on a client according to claim 2, characterized in that: When the language file does not meet the first import condition, after obtaining the corresponding worksheet based on the metadata information, the method further includes: Acquire original text information based on the corresponding worksheet, so as to acquire difference text items and difference position information based on the text information and the original text information; The difference text items and identification information are used to update the corresponding worksheet based on the difference position information to obtain the worksheet to be translated.

4. A method for processing a multi-language resource file on a client according to claim 2, characterized in that: The method of obtaining a worksheet to be translated based on metadata information, new text items, identification information and preset writing rules, obtaining a file to be translated based on the worksheet to be translated, and then obtaining a translation file based on the file to be translated, further includes: A new language item is obtained, and a work list to be translated is obtained based on metadata information, new text items, identification information, new language items and preset writing rules, so as to obtain a file to be translated based on the work list to be translated, and then a translation file is obtained based on the file to be translated.

5. A method for processing multi-language resource files on a client according to claim 1, characterized in that: The method of acquiring and generating a language file based on the written metadata information, the work table to be written and the corresponding preset parsing method to realize the updating and generation of the multi-language resource file on the client side includes: Create language folders according to the preset classification method; Obtain the corresponding preset parsing method, and obtain the generated language file in the language folder based on the written metadata information, the worksheet to be written, the preset classification method and the corresponding preset parsing method.

6. A client multi-language resource file processing system, characterized in that: The method for processing a multi-language resource file on a client side according to any one of claims 1 to 5 is implemented, comprising: A parsing module, used to obtain a language file, and obtain metadata information, text information and identification information based on a preset parsing method and the language file; A reading and writing module, used for obtaining a to-be-translated worksheet based on metadata information, text information, identification information and preset writing rules when the language file meets the first import condition, so as to obtain a to-be-translated file based on the to-be-translated worksheet, and then obtain a translation file based on the to-be-translated file; A generation module is used to obtain write metadata information, write text information and write identification information based on the translation file. When it is determined that the write identification information and the identification information are consistent, the work table to be written is updated based on the write text information, the write identification information and the corresponding preset write rules; based on the write metadata information, the work table to be written and the corresponding preset parsing method, a generated language file is obtained to realize the update and generation of multi-language resource files on the client.

7. A client multi-language resource file processing system according to claim 6, characterized in that: Also includes: The comparison module is used to obtain the corresponding worksheet based on the metadata information when the language file does not meet the first import condition, so as to obtain the original text information based on the corresponding worksheet, thereby obtaining a new text item based on the text information and the original text information, so that the reading and writing module obtains the worksheet to be translated based on the new text item, the identification information, the corresponding worksheet and the preset writing rules, so that the reading and writing module obtains the file to be translated based on the worksheet to be translated, and then the reading and writing module obtains the translation file based on the file to be translated.

8. A client-side multi-language resource file processing system according to claim 7, characterized in that: The comparison module is also used to: obtain original text information based on the corresponding worksheet, and obtain difference text items and difference position information based on the text information and the original text information, so that the reading and writing module uses the difference text items and identification information to update the corresponding worksheet based on the difference position information, so that the reading and writing module obtains the worksheet to be translated.

9. A client multi-language resource file processing system according to claim 7, characterized in that: Also includes: The language module is used to obtain a new language item so that the reading and writing module can obtain a worksheet to be translated based on metadata information, new text items, identification information, new language items and preset writing rules, so that the reading and writing module can obtain a file to be translated based on the worksheet to be translated, and then the reading and writing module can obtain a translation file based on the file to be translated.

10. A client multi-language resource file processing system according to claim 6, characterized in that: The generation module includes an update submodule, a creation submodule and a generation and analysis submodule, wherein: The updating submodule is used to obtain the writing metadata information, the writing text information and the writing identification information based on the translation file, and when it is determined that the writing identification information and the identification information are consistent, update the to-be-written work table based on the writing text information, the writing identification information and the corresponding preset writing rules; The creation submodule is used to create language folders according to a preset classification method; The generation and analysis submodule is used to obtain a corresponding preset analysis method, and to obtain a generated language file in a language folder based on written metadata information, a worksheet to be written, a preset classification method and a corresponding preset analysis method.