Internationalization method and device for heterogeneous platform software

By unifying the target data description format and the use of target middleware, the problem of low internationalization efficiency of heterogeneous platform software is solved, and the unified internationalization of multilingual and multi-frameworks is achieved, and the development complexity and workload are reduced.

CN119127140APending Publication Date: 2024-12-13KYLAND TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411130875.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Traditional software internationalization methods are difficult to adapt to the multi-language and multi-frame environment of heterogeneous platform software, resulting in problems such as large workload, low efficiency and error-prone.

Method used

By unifying the language files in the target data description format, the functional modules of heterogeneous platform software are internationalized, and the target middleware is used to adapt programming languages ​​and software frameworks, reducing developers' specific implementation considerations for each language and framework.

Benefits of technology

It greatly reduces the workload of software development of heterogeneous platforms, improves internationalization efficiency, and improves the readability and unity of files in different languages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127140A_ABST
    Figure CN119127140A_ABST
Patent Text Reader

Abstract

The invention discloses an internationalization method and device for heterogeneous platform software, and belongs to the technical field of computers. The internationalization method of the heterogeneous platform software comprises the steps of determining a language package corresponding to a target language in response to a first input; the language package comprises a first language file for performing data description on a functional module included in the heterogeneous platform software in a target data description format; and completing the internationalization of the heterogeneous platform software based on the programming language and the software framework corresponding to each functional module and the first language file for carrying out data description on the functional module. According to the internationalization method and device for the heterogeneous platform software, internationalization mechanisms of various programming languages and various software frameworks are unified, the first language file based on the target data description format is unified, each function module of the heterogeneous platform software is internationalized, and the internationalization efficiency is improved. The workload of heterogeneous platform software development can be greatly reduced, and the internationalization efficiency of heterogeneous platform software can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a method and device for internationalizing heterogeneous platform software. Background Art

[0002] Platform software is software that links applications and operating infrastructure and architecture and is easy to integrate and manage. As the business scale and complexity of platform software continue to expand, platform software based on multiple programming languages ​​and software frameworks, namely heterogeneous platform software, has emerged.

[0003] Traditional software internationalization methods are mainly aimed at platform software developed based on a single programming language and software framework, and usually different localized versions are developed in different languages. To internationalize heterogeneous platform software based on traditional software internationalization methods, it is necessary to develop localized versions in the required languages ​​for different programming languages ​​and different software frameworks, which is labor-intensive, inefficient, error-prone, and may also cause problems such as inconsistent source code. Therefore, traditional software internationalization methods cannot meet the use scenarios of heterogeneous platform software. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a method and device for internationalizing heterogeneous platform software, which can improve the efficiency of internationalizing heterogeneous platform software.

[0005] In a first aspect, the present application provides a method for internationalizing heterogeneous platform software, the method comprising:

[0006] In response to the first input, determining a language package corresponding to the target language; the language package includes a first language file that describes the function modules included in the heterogeneous platform software in a target data description format;

[0007] Based on the programming language and software framework corresponding to each of the functional modules, and the first language file for data description of the functional modules, the internationalization of the heterogeneous platform software is completed.

[0008] According to the internationalization method of heterogeneous platform software of the present application, by unifying the internationalization mechanisms of multiple programming languages ​​and multiple software frameworks, unifying the first language files based on the target data description format, and internationalizing each functional module of the heterogeneous platform software, software developers do not need to develop localized versions for each language, and do not need to invest more energy in adapting the internationalized language, which can greatly reduce the workload of heterogeneous platform software development and improve the efficiency of heterogeneous platform software internationalization. Furthermore, based on the first language files of various languages, it is possible to adapt to different languages, and the first language files of different languages ​​are more readable, and the implementation of specific programming languages ​​and software frameworks can be shielded. Software developers do not need to consider the implementation of specific programming languages ​​and software frameworks in each language, which can greatly reduce the workload of heterogeneous platform software development.

[0009] According to an embodiment of the present application, the internationalization of the heterogeneous platform software is completed based on the programming language and software framework corresponding to each of the functional modules, and the first language file that describes the data of the functional modules, including:

[0010] For each of the functional modules, based on the programming language and software framework corresponding to the functional module, the target middleware corresponding to the programming language and software framework corresponding to the functional module is called to process the first language file for data description of the functional module, and internationalize the functional module.

[0011] According to an embodiment of the present application, for each of the functional modules, based on the programming language and software framework corresponding to the functional module, calling the target middleware corresponding to the programming language and software framework corresponding to the functional module, processing the first language file for data description of the functional module, and internationalizing the functional module includes:

[0012] For each of the functional modules, the target middleware is called to perform the following processing:

[0013] Converting the first language file corresponding to the function module into a second language file in a target file format corresponding to the programming language and software framework corresponding to the function module;

[0014] The second language file is loaded into the heterogeneous platform software.

[0015] According to an embodiment of the present application, before determining the language package corresponding to the target language in response to the first input, the method further includes:

[0016] A language package corresponding to the target language is received.

[0017] According to one embodiment of the present application, the language package corresponding to the target language is obtained based on a file template in the target data description format; the file template includes an identifier of the item to be translated, the content of the item to be translated in the source language, and an item to be input; the item to be input is used to input the result of translating the content of the item to be translated in the source language into the target language.

[0018] According to an embodiment of the present application, before receiving the language package corresponding to the target language, the method further includes:

[0019] In response to the second input, the document template is sent to the target device.

[0020] In a second aspect, the present application provides a device for internationalizing heterogeneous platform software, the device comprising:

[0021] A determination module, configured to determine a language package corresponding to a target language in response to a first input; the language package includes a first language file that describes data of a functional module included in the heterogeneous platform software in a target data description format;

[0022] The internationalization module is used to complete the internationalization of the heterogeneous platform software based on the programming language and software framework corresponding to each of the functional modules and the first language file for data description of the functional modules.

[0023] According to the internationalization device of heterogeneous platform software of the present application, by unifying the internationalization mechanisms of multiple programming languages ​​and multiple software frameworks, unifying the first language files based on the target data description format, and internationalizing each functional module of the heterogeneous platform software, software developers do not need to develop localized versions for each language, and do not need to invest more energy in adapting the internationalized language, which can greatly reduce the workload of heterogeneous platform software development and improve the efficiency of heterogeneous platform software internationalization. Furthermore, based on the first language files of various languages, it is possible to adapt to different languages, and the first language files of different languages ​​are more readable, and the implementation of specific programming languages ​​and software frameworks can be shielded. Software developers do not need to consider the implementation of specific programming languages ​​and software frameworks in each language, which can greatly reduce the workload of heterogeneous platform software development.

[0024] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for internationalizing heterogeneous platform software as described in the first aspect above is implemented.

[0025] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for internationalizing heterogeneous platform software as described in the first aspect above.

[0026] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the internationalization method of heterogeneous platform software as described in the first aspect.

[0027] In a sixth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for internationalization of heterogeneous platform software as described in the first aspect above.

[0028] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0030] Figure 1 It is a flowchart of the method for internationalizing heterogeneous platform software provided in an embodiment of the present application;

[0031] Figure 2 It is a schematic diagram of an application scenario of the internationalization method of heterogeneous platform software provided in an embodiment of the present application;

[0032] Figure 3 It is a structural diagram of an internationalization device for heterogeneous platform software provided in an embodiment of the present application;

[0033] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0035] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0036] In the related art, as the types of users and the scope of use of software platforms increase, the internationalization of software platforms has become a regular requirement for software platform development. However, for heterogeneous platform software, different programming languages ​​and different software frameworks have different internationalization mechanisms, and traditional software internationalization methods cannot meet the usage scenarios of heterogeneous platform software.

[0037] For example, the requirements of the remote control platform in the embedded environment are becoming more and more complex. The above requirements include but are not limited to: viewing the operation log of the embedded system, remote authorization and remote configuration of the embedded system, etc. The above complex functions usually need to be implemented through multiple programming languages ​​and multiple software frameworks.

[0038] When facing the need to adapt the multi-language internationalization of heterogeneous platform software, it is usually necessary to implement a specific internationalization mechanism for each function based on the internationalization characteristics of each programming language and each software framework. In addition, due to the large differences between different programming languages ​​and different software frameworks, the internationalization functions of the entire heterogeneous platform software cannot be unified, and it is difficult for R&D personnel to adapt to new internationalization languages.

[0039] In conjunction with the accompanying drawings, the internationalization method of heterogeneous platform software, the internationalization device of heterogeneous platform software, the electronic device and the readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0040] The internationalization method of heterogeneous platform software may be applied to a terminal, and may be specifically executed by hardware or software in the terminal.

[0041] The terminal includes, but is not limited to, a portable communication device such as a mobile phone or tablet computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad). It should also be understood that in some embodiments, the terminal may not be a portable communication device, but a desktop computer with a touch-sensitive surface (e.g., a touch screen display and / or a touch pad).

[0042] In the following various embodiments, a terminal including a display and a touch-sensitive surface is described. However, it should be understood that the terminal may include one or more other physical user interface devices such as a physical keyboard, a mouse and a joystick.

[0043] The internationalization method of heterogeneous platform software provided in the embodiment of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the internationalization method of the heterogeneous platform software. The electronic devices mentioned in the embodiment of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The internationalization method of heterogeneous platform software provided in the embodiment of the present application is described below using an electronic device as an example of the execution subject.

[0044] like Figure 1 As shown, the method for internationalizing heterogeneous platform software includes: step 110 and step 120.

[0045] Step 110: In response to the first input, determine a language package corresponding to the target language; the language package includes a first language file that describes the function modules included in the heterogeneous platform software in a target data description format.

[0046] In actual implementation, in order to implement the internationalization method of heterogeneous platform software, language packages corresponding to different languages ​​can be pre-stored. Each language package contains multiple first language files. In the language package, each functional module included in the heterogeneous platform software has a corresponding first language file. Each first language file uses the same data description format to describe the functional module corresponding to the first language file. The same data description format is the target data description format. Each first language file can correspond to one or more functional modules. Each functional module can correspond to a first language file.

[0047] In the above mechanism, the first language files included in each language package are described in the target data description format, and each functional module is also described in the target data description format, which can ensure data consistency and reliability.

[0048] It should be noted that the above-mentioned language packs correspond to languages ​​one by one. For example, the language packs corresponding to the above-mentioned different languages ​​may include, but are not limited to, language packs corresponding to English, language packs corresponding to French, language packs corresponding to Spanish, language packs corresponding to Japanese, and language packs corresponding to Russian. Correspondingly, the first language files contained in each language pack are also the first language files corresponding to the language corresponding to the language pack. For example, in the case where a language pack is a language pack corresponding to English, each first language file contained in the language pack is a first language file corresponding to English; in the case where a language pack is a language pack corresponding to Spanish, each first language file contained in the language pack is a first language file corresponding to Spanish.

[0049] It is understandable that the heterogeneous platform software may include one or more functional modules. Each functional module may be used to implement one or more functions. For example, the above functions may include but are not limited to logging, remote authorization, system configuration, user interface, data processing, data storage, and business logic. Among the functional modules included in the heterogeneous platform software, at least two functional modules correspond to different programming languages ​​and / or software frameworks. The programming language corresponding to the functional module refers to the programming language used to develop the functional module. The software framework corresponding to the functional module refers to the software framework used to develop the functional module.

[0050] In some embodiments, the target data description format may be in XML (Extensible Markup Language) format. XML is an international standard that can ensure data consistency and reliability through strict grammatical regulations. In addition, XML is independent of programming languages ​​and software frameworks, can be used in different programming languages ​​and software frameworks, and is easy to read and understand.

[0051] In some embodiments, a list of stored language packages may be displayed in the target interface by default, or a list of stored language packages may be displayed in the target interface according to an instruction input by a user. The user may input a first input for the list. The first input may be used to determine that one of the stored language packages is a language package corresponding to the target language. The language package corresponding to the target language may be a target language package. The language corresponding to the target language package is the target language.

[0052] It is understandable that heterogeneous platform software can use a language to express content by default, and the internationalization of heterogeneous platform software is to convert the content expressed in the language into the content expressed in the target language. For example, heterogeneous platform software can use Chinese to express content by default, and the interface of the heterogeneous platform software can display components such as "Start" and "Settings". The result of the internationalization of the heterogeneous platform software can include the interface of the heterogeneous platform software correspondingly displaying components such as "Start" and "Settings" (the target language is English).

[0053] In some embodiments, the first input may include at least one of a click input on a button (such as a button or a drop-down menu, etc.) in the target interface, an operation of inputting text into an input box in the target interface, or a voice input or a gesture input based on the target interface, etc. The specific form of the first input is not limited in the embodiments of the present application.

[0054] In some embodiments, the language pack corresponding to each language may be a file in a compressed format, which may include but is not limited to at least one of ZIP compression format, RAR compression format, ZIPX compression format, TAR compression format, 7Z compression format, TGZ compression format, LZH compression format, ISO compression format, GZ compression format, and XZ compression format.

[0055] In some embodiments, the language package corresponding to each language can be a file in ZIP compression format, that is, a ZIP compression package is used as a carrier of the language package. By using a ZIP compression package to integrate multiple first language files corresponding to the same language, each first language file can be managed more conveniently, and confusion and loss can be reduced or even avoided.

[0056] The first input may carry information indicating the target language and / or information indicating the language package corresponding to the target language. Therefore, after receiving the first input, the language package corresponding to the target language may be determined according to the above information carried by the first input.

[0057] Step 120: Based on the programming language and software framework corresponding to each functional module and the first language file for data description of the functional module, the internationalization of the heterogeneous platform software is completed.

[0058] In actual execution, after determining the language package corresponding to the target language, the first language file for describing the data of the functional module in the language package corresponding to the target language is processed based on the programming language and software framework corresponding to each functional module contained in the heterogeneous platform software, using the method corresponding to the programming language and software framework corresponding to the functional module, and internationalizing the functional module. After the internationalization of each functional module contained in the heterogeneous platform software is completed, the internationalization of the heterogeneous platform software is completed.

[0059] It is understandable that the internationalization mechanism of each programming language is specified in the normative document of each programming language, and the internationalization mechanism of each software framework is specified in the normative document of each programming language. According to the programming language and software framework corresponding to each functional module included in the heterogeneous platform software, the first language file for data description of the functional module can be processed based on the internationalization mechanism specified in the above normative documents to internationalize the functional module.

[0060] According to the method for internationalizing heterogeneous platform software provided in the embodiment of the present application, by unifying the internationalization mechanisms of multiple programming languages ​​and multiple software frameworks, unifying the first language files based on the target data description format, and internationalizing each functional module of the heterogeneous platform software, software developers do not need to develop localized versions for each language, and do not need to invest more energy in adapting the internationalized language, which can greatly reduce the workload of heterogeneous platform software development and improve the efficiency of heterogeneous platform software internationalization. Furthermore, based on the first language files of various languages, adaptation to different languages ​​can be achieved, and the first language files of different languages ​​are more readable, and the implementation of specific programming languages ​​and software frameworks can be shielded. Software developers do not need to consider the implementation of specific programming languages ​​and software frameworks in each language, which can greatly reduce the workload of heterogeneous platform software development.

[0061] In some embodiments, based on the programming language and software framework corresponding to each functional module, and the first language file that describes the data of the functional module, the internationalization of the heterogeneous platform software is completed, including: for each functional module respectively, based on the programming language and software framework corresponding to the functional module, calling the target middleware corresponding to the programming language and software framework corresponding to the functional module, processing the first language file that describes the data of the functional module, and internationalizing the functional module.

[0062] In actual execution, for each functional module included in the heterogeneous platform software, the target middleware can be called based on the programming language and software framework corresponding to the functional module to process the first language file that describes the data of the functional module and internationalize the functional module. The target middleware corresponds to the programming language and software framework corresponding to the functional module and is used to implement the internationalization mechanism of the programming language and software framework corresponding to the functional module.

[0063] It is understandable that heterogeneous platform software may include middleware for implementing internationalization mechanisms. Each middleware may be used to implement the internationalization mechanism of a programming language or a software framework. Specific middleware may be provided for different programming languages ​​and different software frameworks to adapt the internationalization mechanism. The above middleware also uses the target data description format for data description.

[0064] According to the method for internationalizing heterogeneous platform software provided in the embodiment of the present application, by calling the target middleware corresponding to the programming language and software framework corresponding to each functional module based on the programming language and software framework corresponding to the functional module, processing the first language file for data description of the functional module, and internationalizing the functional module, it is possible to internationalize the heterogeneous platform software based on a unified internationalization mechanism, thereby improving the efficiency of internationalization of the heterogeneous platform software.

[0065] In some embodiments, for each functional module, based on the programming language and software framework corresponding to the functional module, calling the target middleware corresponding to the programming language and software framework corresponding to the functional module, processing the first language file for data description of the functional module, and internationalizing the functional module includes:

[0066] For each functional module, call the target middleware and perform the following processing:

[0067] Converting a first language file corresponding to the function module into a second language file in a target file format corresponding to the programming language corresponding to the function module and the software framework;

[0068] Loading second language files into heterogeneous platform software.

[0069] In actual execution, for each functional module included in the heterogeneous platform software, the target middleware can be called based on the programming language and software framework corresponding to the functional module, and the first language file corresponding to the functional module can be converted into a second language file in the target file format. The target file format corresponds to the programming language and software framework corresponding to the functional module.

[0070] After obtaining the second language file, the second language file is loaded into the heterogeneous platform software to realize the internationalization of the functional module.

[0071] In some embodiments, the internationalization mechanism of the programming language Python is mainly implemented based on the [gettext] module in its standard library and the third-party framework [babel]. The target file formats corresponding to the programming language Python are [.po] format and [.mo] format, and data is described by files in the above two formats. Among them, the file in [.mo] format is a binary file, the file in [.po] format is a text file, and the file in [.mo] format is obtained by post-compiling the file in [.po] format.

[0072] When the programming language corresponding to the functional module is Python, the target middleware is the middleware corresponding to the programming language Python (which can be recorded as Middleware-Python). By calling the target middleware, the first language file corresponding to the target data description format (such as XML, etc.) of the functional module can be converted into a second language file in the [.po] format, and then the second language file in the [.po] format is compiled to obtain the second language file in the [.mo] format, and the second language file in the [.mo] format is loaded into the heterogeneous platform software based on Python's internationalization mechanism.

[0073] In some embodiments, the internationalization mechanism of the programming language Java is mainly implemented based on its [ResourceBundle] module. The target file format corresponding to the programming language Java is the [.properties] format, and data is described through files in this format. Among them, the file in the [.properties] format is a text file.

[0074] When the programming language corresponding to the functional module is Java, the target middleware is the middleware corresponding to the programming language Java (which can be recorded as Middleware-Java). By calling the target middleware, the first language file corresponding to the target data description format (such as XML, etc.) of the functional module can be converted into a second language file in the [.properties] format, and the second language file in the [.properties] format can be loaded into the heterogeneous platform software based on the [ResourceBundle] module.

[0075] In some embodiments, the internationalization mechanism of the software framework Vue is mainly implemented based on its [vue-i18n] module. The target file format corresponding to the software framework Vue is [.json] format, and data is described through files in this format. Among them, the file in [.json] format is a text file.

[0076] When the software framework corresponding to the functional module is Vue, the target middleware is the middleware corresponding to the software framework Vue (which can be recorded as Middleware-Vue). By calling the target middleware, the first language file in the target data description format (such as XML, etc.) corresponding to the functional module can be converted into a second language file in the [.json] format, and the second language file in the [.json] format can be loaded into the heterogeneous platform software based on the [vue-i18n] module.

[0077] According to the method for internationalizing heterogeneous platform software provided in the embodiment of the present application, by converting the first language file corresponding to each functional module into a second language file in a target file format corresponding to the programming language and software framework corresponding to the functional module, and then loading the second language file into the heterogeneous platform software, the functional module is internationalized. This can achieve internationalization of the heterogeneous platform software based on a unified internationalization mechanism, thereby improving the efficiency of internationalization of the heterogeneous platform software.

[0078] In some embodiments, before determining the language package corresponding to the target language in response to the first input, the method further includes: receiving the language package corresponding to the target language.

[0079] In actual execution, in addition to pre-storing language packs corresponding to different languages, language packs corresponding to different languages ​​may also be imported.

[0080] In the case where a language pack corresponding to the target language is not pre-stored, a language pack corresponding to the target language may be received by the user through other devices or imported locally.

[0081] In some embodiments, the heterogeneous platform software may include an interface for uploading language packages. Through this interface, users can import language packages corresponding to any language into the heterogeneous platform software to complete the switching of multiple languages. Through the above mechanism, the needs of internationalization in different scenarios can be met. The heterogeneous platform software can have built-in (i.e., pre-stored) language packages corresponding to multiple languages, or users can import language packages corresponding to different languages ​​to switch languages.

[0082] According to the internationalization method of heterogeneous platform software provided in the embodiment of the present application, by separating the development of heterogeneous platform software and the generation of language packages, it supports the import of translated language packages. When faced with new international language adaptation requirements, the developers of heterogeneous platform software do not need to perform complicated internationalization adaptation work. The translated language packages can be completed by other personnel. Users can import the translated language packages into the heterogeneous platform software to complete the language switching function of the heterogeneous platform software, which can greatly reduce the workload of heterogeneous platform software development and improve the efficiency of heterogeneous platform software internationalization.

[0083] In some embodiments, the language package corresponding to the target language is obtained based on a file template in a target data description format; the file template includes an identifier of the item to be translated, the content of the item to be translated in the source language, and an item to be input; the item to be input is used to input the result of translating the content of the item to be translated in the source language into the target language.

[0084] In actual implementation, a file template for each first language file may be predefined, and the file template is based on the target data description format.

[0085] Each file template may include an identifier of the item to be translated, the content of the item to be translated in the source language, and an item to be input. The identifier of the item to be translated is used to distinguish the translation item. The source language may be a language used by default to express the content. The item to be input may be used to input the translation result of the item to be translated into the file template, thereby obtaining a first language file.

[0086] For example, a first language file (taking the target data description format as XML format as an example, but not limited to this format) may be as follows:

[0087] <? xml version=1.0encoding=”uTf-8”? >

[0088] <items>

[0089] <item ID=”1000”raw=”System Platform”msg=”System Platform” / >

[0090] <item ID=”1001”raw=”Netcard Information”msg=”Netcard Information” / >

[0091] < / items> .

[0092] The first language file is a first language file corresponding to English. <item>A node represents an item to be translated; item ID is the identifier of the item to be translated (1000 and 1001 in the above example); raw is the content of the item to be translated (the content expressed in Chinese as the source language in the above example), which is used to guide translators in translation; msg is the result of translating the content of the item to be translated in the source language into the target language (the content expressed in English as the target language in the above example).

[0093] It is understandable that the part after "msg=" is an item to be input, and the translator can input the translation result there. In the above example, when "System Platform" and "Netcard Information" are not input, it is a file template; after inputting "System Platform" and "Netcard Information", the first language file shown in the above example is obtained.

[0094] Provide the content to be translated of the entire system platform to third-party translators in the form of templates

[0095] According to the internationalization method of heterogeneous platform software provided in the embodiment of the present application, a file module is provided by a well-defined data format, and the target language is obtained based on a file template in the target data description format. It is more convenient to obtain language packages corresponding to various languages, so that based on the language package corresponding to the language, the language of the platform software can be more conveniently switched to the language, which can improve the efficiency of internationalization of heterogeneous platform software.

[0096] In some embodiments, before receiving the language package corresponding to the target language, the method further includes: sending the file template to the target device in response to a second input.

[0097] In actual implementation, the content to be translated of the entire heterogeneous platform software can be provided to users in the form of file templates. Users can translate the items to be translated in the file templates into the target language by themselves or through a third party, thereby obtaining the language package corresponding to the target language.

[0098] In some embodiments, before receiving the language package corresponding to the target language, a file template can be sent to the target device so that users who need to internationalize heterogeneous platform software can obtain the file template, and then translate it based on the file template to obtain the language package corresponding to the target language required by the user.

[0099] In some embodiments, the second input may be used to request that a file template be sent to a target device. The specific form of the second input is not limited in the embodiments of the present application.

[0100] In some embodiments, after obtaining the language package corresponding to the target language, the language package corresponding to the target language can be imported into the heterogeneous platform software through the target device or other equipment.

[0101] For example, Figure 2 As shown, a heterogeneous platform software may include functional modules such as a logging tool, a remote authorization tool, a system configuration tool, and a performance analysis tool. Among them, the programming language corresponding to the logging tool is Java, the programming language corresponding to the remote authorization tool is Python, and the software framework corresponding to the system configuration tool and the performance analysis tool is Vue.

[0102] The first language file included in the language package (taking the target data description format as XML format as an example, but not limited to this format) may be as shown in Table 1.

[0103] Table 1 List of first language documents

[0104] First language document Function LogRecored.xml Data description for log viewing tools Auth.xml Data description for remote authorization tools Latency.xml Data description for performance analysis tools SystemConfig.xml Data description for system configuration tools ToolBox.xml Data description for the platform toolbox ( Figure 2 (not shown)

[0105] It is understandable that the file template corresponding to the first language file LogRecored.xml may include items to be translated of the log viewing tool, the file template corresponding to the first language file Auth.xml may include items to be translated of the remote authorization tool, the file template corresponding to the first language file Latency.xml may include items to be translated of the performance analysis tool, the file template corresponding to the first language file SystemConfig.xml may include items to be translated of the system configuration tool, and the file template corresponding to the first language file ToolBox.xml may include items to be translated of the platform toolbox. The above items to be translated may specifically include the identifier of the item to be translated, the content of the item to be translated in the source language, and the item to be input.

[0106] In some embodiments, by importing the language package translated by a third party, the language package corresponding to n languages ​​such as XML1 to XMLn can be obtained. Wherein, n is a positive integer. Any of the above n language packages can be used as the language package corresponding to the target language. Middleware-Python, Middleware-Java, and Middleware-Vue are the target middleware corresponding to the remote authorization tool, the logging tool, the system configuration tool, and the performance analysis tool, respectively. Through the middleware Middleware-Python, the first language file (xml format) in which the data of the remote authorization tool is described in the language package corresponding to the target language can be converted to a second language file (the file name can be expressed as "*.mo"), and then the second language file is loaded into the heterogeneous platform software. Through the middleware Middleware-Java, the first language file (xml format) in which the data of the logging tool is described in the language package corresponding to the target language can be converted to a second language file (the file name can be expressed as "*.properties"), and then the second language file is loaded into the heterogeneous platform software. Through the middleware Middleware-Vue, the first language file (xml format) that describes the data of the system configuration tool and performance analysis tool in the language package corresponding to the target language can be converted into a second language file (the file name can be expressed as "*.properties"), and then the second language file is loaded into the heterogeneous platform software. Through the above process, the internationalization of the heterogeneous platform software can be completed.

[0107] According to the internationalization method of heterogeneous platform software provided in the embodiment of the present application, by responding to the second input, the file template is sent to the target device, so that the user can obtain the language package corresponding to the target language based on the file template, separate the development of the heterogeneous platform software and the generation of the language package, and support the import of translated language packages. When facing new international language adaptation requirements, the developers of the heterogeneous platform software do not need to perform complicated internationalization adaptation work, and the translated language packages can be completed by other personnel. The user imports the translated language packages into the heterogeneous platform software to complete the language switching function of the heterogeneous platform software, which can greatly reduce the workload of heterogeneous platform software development and improve the efficiency of heterogeneous platform software internationalization.

[0108] The internationalization method of heterogeneous platform software provided in the embodiment of the present application can be executed by the internationalization device of heterogeneous platform software. In the embodiment of the present application, the internationalization method of heterogeneous platform software performed by the internationalization device of heterogeneous platform software is taken as an example to illustrate the internationalization device of heterogeneous platform software provided in the embodiment of the present application.

[0109] The embodiment of the present application also provides an internationalization device for heterogeneous platform software.

[0110] like Figure 3 As shown, the internationalization device of the heterogeneous platform software includes: a determination module 310 and an internationalization module 320. The determination module 310 is used to determine a language package corresponding to a target language in response to a first input; the language package includes a first language file that describes data of a functional module included in the heterogeneous platform software in a target data description format;

[0111] The internationalization module 320 is used to complete the internationalization of heterogeneous platform software based on the programming language and software framework corresponding to each functional module and the first language file for data description of the functional module.

[0112] According to the internationalization device of heterogeneous platform software provided by the embodiment of the present application, by unifying the internationalization mechanisms of multiple programming languages ​​and multiple software frameworks, unifying the first language files based on the target data description format, and internationalizing each functional module of the heterogeneous platform software, software developers do not need to develop localized versions for each language, and do not need to invest more energy in adapting the internationalized language, which can greatly reduce the workload of heterogeneous platform software development and improve the efficiency of heterogeneous platform software internationalization. Furthermore, based on the first language files of various languages, it is possible to adapt to different languages. The first language files of different languages ​​are more readable and can shield the implementation of specific programming languages ​​and software frameworks. Software developers do not need to consider the implementation of specific programming languages ​​and software frameworks in each language, which can greatly reduce the workload of heterogeneous platform software development.

[0113] In some embodiments, the internationalization module 320 can be specifically used to call the target middleware corresponding to the programming language and software framework corresponding to the functional module for each functional module respectively, based on the programming language and software framework corresponding to the functional module, process the first language file that describes the data of the functional module, and internationalize the functional module.

[0114] In some embodiments, the internationalization module 320 may be specifically configured to call the target middleware for each functional module and perform the following processing:

[0115] Converting a first language file corresponding to the function module into a second language file in a target file format corresponding to the programming language corresponding to the function module and the software framework;

[0116] Loading second language files into heterogeneous platform software.

[0117] In some embodiments, the internationalization device of the heterogeneous platform software may further include:

[0118] The receiving module is used to receive the language package corresponding to the target language.

[0119] In some embodiments, the language package corresponding to the target language is obtained based on a file template in a target data description format; the file template includes an identifier of the item to be translated, the content of the item to be translated in the source language, and an item to be input; the item to be input is used to input the result of translating the content of the item to be translated in the source language into the target language.

[0120] In some embodiments, the internationalization device of the heterogeneous platform software may further include:

[0121] The sending module is used to send the file template to the target device in response to the second input.

[0122] The internationalization device of the heterogeneous platform software in the embodiment of the present application can be an electronic device, or a component in an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0123] The internationalization device of the heterogeneous platform software in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0124] The internationalization device of heterogeneous platform software provided in the embodiment of the present application can achieve Figure 1 to Figure 2 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0125] In some embodiments, Figure 4 As shown, an embodiment of the present application further provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and executable on the processor 401. When the program is executed by the processor 401, each process of the above-mentioned heterogeneous platform software internationalization method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0126] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0127] The embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned internationalization method embodiment of heterogeneous platform software are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0128] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0129] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned method for internationalizing heterogeneous platform software when executed by a processor.

[0130] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0131] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned heterogeneous platform software internationalization method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0132] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0133] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0134] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0135] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0136] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0137] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.< / item>

Claims

1. A method for internationalizing heterogeneous platform software, characterized in that: include: In response to the first input, determining a language package corresponding to the target language; the language package includes a first language file that describes the function modules included in the heterogeneous platform software in a target data description format; Based on the programming language and software framework corresponding to each of the functional modules, and the first language file for data description of the functional modules, the internationalization of the heterogeneous platform software is completed.

2. The method for internationalizing heterogeneous platform software according to claim 1, characterized in that: The internationalization of the heterogeneous platform software is completed based on the programming language and software framework corresponding to each of the functional modules, and the first language file for data description of the functional modules, including: For each of the functional modules, based on the programming language and software framework corresponding to the functional module, the target middleware corresponding to the programming language and software framework corresponding to the functional module is called to process the first language file for data description of the functional module, and internationalize the functional module.

3. The method for internationalizing heterogeneous platform software according to claim 2, characterized in that: The method of calling target middleware corresponding to the programming language and software framework corresponding to each functional module based on the programming language and software framework corresponding to the functional module, processing the first language file for describing data of the functional module, and internationalizing the functional module includes: For each of the functional modules, the target middleware is called to perform the following processing: Converting the first language file corresponding to the function module into a second language file in a target file format corresponding to the programming language and software framework corresponding to the function module; The second language file is loaded into the heterogeneous platform software.

4. The method for internationalizing heterogeneous platform software according to any one of claims 1 to 3, characterized in that: Before determining the language package corresponding to the target language in response to the first input, the method further includes: A language package corresponding to the target language is received.

5. The method for internationalizing heterogeneous platform software according to claim 4, characterized in that: The language package corresponding to the target language is obtained based on a file template in the target data description format; the file template includes an identifier of the item to be translated, the content of the item to be translated in the source language, and an item to be input; The item to be input is used to input the result of translating the content of the item to be translated in the source language into the target language.

6. The method for internationalizing heterogeneous platform software according to claim 5, characterized in that: Before receiving the language package corresponding to the target language, the method further includes: In response to the second input, the document template is sent to the target device.

7. An internationalization device for heterogeneous platform software, characterized in that: include: A determination module, configured to determine a language package corresponding to a target language in response to a first input; the language package includes a first language file that describes data of a functional module included in the heterogeneous platform software in a target data description format; The internationalization module is used to complete the internationalization of the heterogeneous platform software based on the programming language and software framework corresponding to each of the functional modules and the first language file for data description of the functional modules.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method for internationalizing heterogeneous platform software as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for internationalizing heterogeneous platform software as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for internationalizing heterogeneous platform software as described in any one of claims 1 to 6 is implemented.