Software internationalization processing method and system, terminal and storage medium
By automatically loading and updating language menu configuration files and language pack files, the international processing of the human-computer interaction software of the automatic train monitoring system is realized, solving the problem of high deployment costs in traditional methods, reducing costs and enhancing the robustness of the software. Great sex.
Patent Information
- Application Number
- CN202410808404.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-09-10
AI Technical Summary
Traditional software internationalization methods require recompiling software programs when adding languages, resulting in high deployment costs for human-computer interaction software for automatic train monitoring systems.
By obtaining pre-created language menu configuration files and language pack files, the interface of the human-computer interaction software is automatically loaded and updated to realize automatic loading and hot switching of language menus without the need for hard compilation of programs.
It reduces the cost of software internationalization deployment, enhances the robustness of the software, and reduces the workload of on-site manual upgrades.
Smart Images

Figure CN118626192A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a software internationalization processing method, system, terminal and storage medium. Background Art
[0002] The station diagram software and operation diagram software are the human-computer interaction software of the entire Automatic Train Supervision (ATS). Through the station diagram software, users can issue various commands to control the status of the equipment in the station diagram, thereby affecting the operation of the train; through the operation diagram software, users can compile plans and command the operation of the train. With the continuous development of internationalization, in order to better enter the international rail transit market, the automatic train monitoring system also urgently needs to realize the internationalization of the human-computer interaction software interface. The traditional software internationalization method requires recompiling the software program when adding a language, which has high deployment costs.
[0003] Therefore, how to reduce the international deployment cost of the human-computer interaction software of the train automatic monitoring system is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0004] To solve the above technical problems, the present application provides a software internationalization processing method, which can reduce the deployment cost of the internationalization of human-computer interaction software of the train automatic monitoring system. The present application also provides a software internationalization processing system, terminal and storage medium, which have the same technical effects.
[0005] The first objective of this application is to provide a software internationalization processing method.
[0006] The above-mentioned application objective 1 of the present application is achieved through the following technical solutions: A software internationalization processing method is applied to human-computer interaction software of a train automatic monitoring system, the method comprising: Obtain a language menu configuration file pre-created to match the human-machine interaction software of the automatic train monitoring system; Loading the language menu configuration file to add a language menu on the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, the submenu corresponds to the switchable language type of the human-computer interaction software, and in an initial state, the parent menu corresponds to the current language type of the human-computer interaction software as a default language type; Acquire a language switching instruction for the language menu input by a user, wherein the language switching instruction is used to indicate a target submenu in at least one of the submenus in the language menu; According to the language type corresponding to the target submenu, a pre-created language package file is obtained; The interface of the human-computer interaction software is updated according to the language pack file, wherein the parent menu is updated to the language type corresponding to the target submenu, and the target submenu is updated to the language type corresponding to the parent menu before being updated.
[0007] Preferably, in the software internationalization processing method, the interface of the human-computer interaction software includes interface control elements, interface text elements and station map elements; the language package file is constructed by the following steps: Acquire the properties of all elements in the interface of the human-computer interaction software, wherein the properties of the elements include the properties of interface control elements, the properties of interface text elements, and the properties of station diagram elements; Acquire text data of a preset language type corresponding to the attribute of the element; A language pack file in XML format is constructed according to the text data.
[0008] Preferably, in the software internationalization processing method, the interface control elements include system-defined control elements and user-defined control elements; and updating the interface of the human-computer interaction software according to the language package file includes: For the system-defined control element, use the Name attribute in Control as an index item and obtain corresponding text data from the language pack file to update the interface information corresponding to the system-defined control element; For the user-defined control element, according to the index item of the ControlCollection object method, the corresponding text data is obtained from the language pack file to update the interface information corresponding to the user-defined control element; For the interface text element and the station map element, Name in ConstantInfo is used as an index item to obtain corresponding text data from the language pack file to update the interface information corresponding to the interface text element and the station map element.
[0009] Preferably, the software internationalization processing method further includes: According to the language type corresponding to the target submenu, obtain a pre-created voice package file; Acquire a voice broadcast instruction, and perform voice broadcast according to the voice broadcast instruction and the voice package file.
[0010] The second objective of the present application is to provide a software internationalization processing system.
[0011] The second application objective of the present application is achieved through the following technical solutions: A software internationalization processing system is applied to human-computer interaction software of a train automatic monitoring system, and the system comprises: A first acquisition unit is used to acquire a language menu configuration file pre-created to match the human-computer interaction software of the train automatic monitoring system; A loading unit, used to load the language menu configuration file to add a language menu to the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, the submenu corresponds to the switchable language type of the human-computer interaction software, and in an initial state, the parent menu corresponds to the current language type of the human-computer interaction software as a default language type; A second acquiring unit, configured to acquire a language switching instruction for the language menu input by a user, wherein the language switching instruction is used to indicate a target submenu in at least one of the submenus in the language menu; A third acquisition unit, configured to acquire a pre-created language package file according to the language type corresponding to the target submenu; An updating unit is used to update the interface of the human-computer interaction software according to the language pack file, wherein the parent menu is updated to the language type corresponding to the target submenu, and the target submenu is updated to the language type corresponding to the parent menu before updating.
[0012] Preferably, in the software internationalization processing system, the interface of the human-computer interaction software includes interface control elements, interface text elements and station diagram elements; the software internationalization processing system further includes a construction unit for constructing the language package file, and when the construction unit executes the construction of the language package file, it is specifically used to: Acquire the properties of all elements in the interface of the human-computer interaction software, wherein the properties of the elements include the properties of interface control elements, the properties of interface text elements, and the properties of station diagram elements; Acquire text data of a preset language type corresponding to the attribute of the element; A language pack file in XML format is constructed according to the text data.
[0013] Preferably, in the software internationalization processing system, the interface control elements include system-defined control elements and user-defined control elements; and the updating unit, when executing the updating of the interface of the human-computer interaction software according to the language pack file, is specifically used to: For the system-defined control element, use the Name attribute in Control as an index item and obtain corresponding text data from the language pack file to update the interface information corresponding to the system-defined control element; For the user-defined control element, according to the index item of the ControlCollection object method, the corresponding text data is obtained from the language pack file to update the interface information corresponding to the user-defined control element; For the interface text element and the station map element, Name in ConstantInfo is used as an index item to obtain corresponding text data from the language pack file to update the interface information corresponding to the interface text element and the station map element.
[0014] Preferably, the software internationalization processing system further comprises a broadcast unit, and the broadcast unit is used to: According to the language type corresponding to the target submenu, obtain a pre-created voice package file; Acquire a voice broadcast instruction, and perform voice broadcast according to the voice broadcast instruction and the voice package file.
[0015] The third objective of the present application is to provide a software internationalization processing terminal.
[0016] The third application objective of this application is achieved through the following technical solutions: A software internationalization processing terminal, comprising: a storage medium and a processor; The storage medium stores computer-executable instructions; The processor executes the computer-executable instructions stored in the storage medium to implement any of the above-mentioned software internationalization processing methods.
[0017] The fourth object of this application is to provide a computer-readable storage medium.
[0018] The fourth application objective of this application is achieved through the following technical solutions: A computer-readable storage medium stores computer-executable instructions, which are used to implement any of the above-mentioned software internationalization processing methods when executed by a processor.
[0019] The above technical solution is applied to the human-computer interaction software of the train automatic monitoring system, by obtaining a language menu configuration file pre-created to match the human-computer interaction software of the train automatic monitoring system; loading the language menu configuration file to add a language menu to the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, and the submenu corresponds to the switchable language type of the human-computer interaction software; obtaining the language switching instruction for the language menu input by the user, wherein the language switching instruction is used to indicate a target submenu in at least one submenu of the language menu; obtaining a pre-created language package file according to the language type corresponding to the target submenu; and updating the interface of the human-computer interaction software according to the language package file. Based on the above technical solution, the automatic loading of the language menu can be realized, and hot switching can be realized. When the language needs to be added, only the corresponding language menu configuration file and language package file need to be added, and the automatic addition of the language can be realized without the hard compiler program, which greatly enhances the robustness of the software, reduces the cost of on-site manual upgrades, and reduces the workload of data personnel. In summary, the above technical solution can reduce the deployment cost of the internationalization of the human-computer interaction software of the train automatic monitoring system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0021] Figure 1 A flowchart of a software internationalization processing method provided in an embodiment of the present application; Figure 2 A code example diagram of a language menu configuration file provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a software internationalization processing system provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of a software internationalization processing terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] In the embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described below are merely schematic. For example, the division of modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0024] It should be understood that the use of "system", "device", "unit" and / or "module" in this application is only a method for distinguishing different components, elements, parts, parts or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.
[0025] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.
[0026] If a flow chart is used in the present application, the flow chart is used to illustrate the operations performed by the system according to the embodiment of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, each step can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or a certain step or several steps of operations can be removed from these processes.
[0027] It should also be noted that, in this article, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that an 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 articles or devices. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the article or device including the above elements.
[0028] The embodiments of the present application are written in a progressive manner.
[0029] like Figure 1 As shown, an embodiment of the present application provides a software internationalization processing method, which is applied to human-computer interaction software of a train automatic monitoring system, and the method includes: S101. Obtain a language menu configuration file pre-created to match the human-computer interaction software of the train automatic monitoring system; In S101, specifically, the language menu configuration file may be a program configuration code of the human-computer interaction software pre-written by a data personnel, which is used to add a language menu to the interface of the human-computer interaction software; the specific configuration method of the language menu configuration file may be determined based on actual application requirements, and different language menu configuration files may be pre-written for different software internationalization requirements to add different types of language menus to the interface of the human-computer interaction software; the specific acquisition method of the language menu configuration file does not affect the implementation of this embodiment; S102. Loading a language menu configuration file to add a language menu to the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, and the submenu corresponds to the switchable language type of the human-computer interaction software. In the initial state, the parent menu corresponds to the current language type of the human-computer interaction software as the default language type; In S102, specifically, when the human-computer interaction software needs to add a language, in order to enhance the robustness of the software, a language menu is added to the interface of the human-computer interaction software by loading a language menu configuration file, and the language menu configuration file can be automatically loaded through program code. In order to adapt to localization requirements, after the language menu configuration file is loaded for the first time, a default language menu can be added to the interface of the human-computer interaction software. When the software is started, all language menus are automatically loaded and the configured default language is displayed. In the initial state, the parent menu corresponds to the current language type of the human-computer interaction software as the default language type. The parent menu corresponds to the current language type of the human-computer interaction software. For example, in the initial state, the parent menu can be configured by default as the language type mainly used locally; the submenu corresponds to the switchable language type of the human-computer interaction software. For example, the submenu can be configured as a language type commonly used in other countries or regions. When switching languages, the language text of the parent menu of the language menu can be replaced with the language text of the corresponding submenu item. This application does not impose specific restrictions on this.
[0030] In a specific embodiment, a code example of a language menu configuration file is as follows: Figure 2 As shown, the present application is not limited thereto.
[0031] S103. Obtaining a language switching instruction for a language menu input by a user, wherein the language switching instruction is used to indicate a target submenu in at least one submenu in the language menu; In S103, specifically, the language switching instruction can be a control switching signal generated by a user through a mouse click. For example, a user clicks a submenu of a language menu in the interface of the human-computer interaction software, and a corresponding language switching instruction can be generated. The language switching instruction is used to indicate the submenu clicked by the user's mouse in at least one submenu of the language menu. The submenu clicked by the user's mouse can be used as the target submenu. The generation and acquisition methods of the language switching instruction can also be other, and the present application is not limited thereto.
[0032] S104. Obtain a pre-created language package file according to the language type corresponding to the target submenu; In S104, specifically, each submenu in the language menu may correspond to a language type; for each language type, a language pack file may be pre-created; and according to the language type corresponding to the target submenu, a language pack file having the same language type as the language type corresponding to the target submenu may be obtained. The language pack file may be stored in a preset database, and when switching languages, the human-computer interaction software may obtain the corresponding language pack file from the preset database, but the present application is not limited thereto.
[0033] S105. Update the interface of the human-computer interaction software according to the language pack file, wherein the parent menu is updated to the language type corresponding to the target submenu, and the target submenu is updated to the language type corresponding to the parent menu before the update.
[0034] In S105, specifically, after obtaining the language pack file, the interface information of the human-computer interaction software can be updated according to the data in the language pack file to realize automatic language switching of the human-computer interaction software, wherein, for the language menu, the parent menu is updated to the language type corresponding to the target submenu, and the target submenu is updated to the language type corresponding to the parent menu before the update, that is, the language text of the parent menu of the language menu can be first updated to the language text corresponding to the target submenu item, and accordingly, the target submenu can be updated to the language text corresponding to the parent menu before the previous update.
[0035] In other embodiments, when the human-computer interaction software is restarted, the default language may or may not be changed. If the default language is changed, the next time the software is started, the corresponding language pack file is obtained and loaded according to the changed default language to update the interface of the human-computer interaction software.
[0036] The above embodiment is applied to the human-computer interaction software of the train automatic monitoring system, by obtaining a language menu configuration file pre-created to match the human-computer interaction software of the train automatic monitoring system; loading the language menu configuration file to add a language menu to the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, and the submenu corresponds to the switchable language type of the human-computer interaction software; obtaining the language switching instruction for the language menu input by the user, wherein the language switching instruction is used to indicate a target submenu in at least one submenu of the language menu; obtaining a pre-created language package file according to the language type corresponding to the target submenu; and updating the interface of the human-computer interaction software according to the language package file. Based on the above technical solution, the automatic loading of the language menu can be realized, and hot switching can be realized. When the language needs to be added, only the corresponding language menu configuration file and language package file need to be added, and the automatic addition of the language can be realized without the hard compiler program, which greatly enhances the robustness of the software, reduces the cost of on-site manual upgrades, and reduces the workload of data personnel. In summary, the above embodiment can reduce the deployment cost of the internationalization of the human-computer interaction software of the train automatic monitoring system.
[0037] In other embodiments of the present application, by classifying all elements that need internationalization processing in the interface of the human-computer interaction software of the train automatic monitoring system, they can be divided into three categories: interface control elements, interface text elements and station map elements, among which: Interface control elements can include the following attributes: ① name (unique within a single collection); ② display content; ③ shortcut keys; ④ prompt information.
[0038] Interface text elements can include the following attributes: ① name (globally unique); ② display content.
[0039] Station diagram elements may include the following attributes: ① system diagram equipment elements; ② station diagram equipment right-click menu elements; ③ station diagram equipment names; ④ station diagram floating frame element elements; ⑤ control commands; ⑥ representation code positions / control code positions; ⑦ station diagram control elements (designed according to ordinary interface control elements).
[0040] In a specific embodiment, according to different requirements of program controls, the forms, shared controls, etc. in the program are used as interface control elements and designed as ControlCollection, where the definition criteria of ControlCollection include: 1) forms; 2) custom controls. Controls may be shared by multiple forms. If the use of each form is different, logical processing is performed separately in each form. With ControlCollection as the parent node of the interface design scheme, interface control elements, interface text elements, and station map elements can also be designed as Control and / or ConstantInfo. For specific design items, see Table 1.
[0041] Table 1 Element design scheme
[0042] In other embodiments of the present application, in the above software internationalization processing method, the language package file is constructed by the following steps: S201. Obtaining the properties of all elements in the interface of the human-computer interaction software, wherein the properties of the elements include the properties of the interface control elements, the properties of the interface text elements, and the properties of the station diagram elements; In S201, specifically, the ControlCollection object method can be used to traverse all interface control elements in the interface of the human-computer interaction software to obtain the properties of the interface control elements; the properties of the interface text elements can be obtained by traversing all interface text elements in the interface of the human-computer interaction software; the properties of the station field diagram elements can be obtained by traversing all station field diagram elements in the interface of the human-computer interaction software. Specifically, the properties of data-related elements are automatically generated by importing from the basic data file.
[0043] S202. Acquire text data of a preset language type corresponding to the attribute of the element; In S202, specifically, the text in the attributes of all elements in the interface of the human-computer interaction software can be translated into a preset language type by machine translation or manual translation to obtain text data corresponding to the attributes of the elements. The preset language type can be the same as the language type corresponding to the target submenu.
[0044] S203. Construct a language package file in XML format according to the text data.
[0045] In S203, specifically, a language pack file in XML format can be established based on the obtained text data of the preset language type, and the language pack file can be stored in a preset database, so that the human-computer interaction software can obtain the corresponding language pack file when switching languages. In some embodiments, the parent menu of the language menu can be associated with the language pack file name of the default language type, and the submenu in the language menu can be associated with the language pack file name of the corresponding language type, so that after the language menu is automatically loaded, the language pack text under the configured path can be automatically read. Among them, the XML format, also known as the Extensible Markup Language (Extensible Markup Language) format, has the advantages of good scalability, separation of content and form, compliance with strict grammatical requirements, good value preservation, etc., which is convenient for human-computer interaction software to read and write data.
[0046] In other embodiments of the present application, by classifying the interface control elements in the interface of the human-computer interaction software of the train automatic monitoring system, they can be divided into two categories: system-defined control elements and user-defined control elements; wherein: the system-defined control elements may be control elements defined by the train automatic monitoring system, such as buttons, menus, and right-click menus; the user-defined control elements may be control elements customized by the user, such as a general command window, a general execution panel, and a time control; In a specific embodiment, the specific structure meaning of the language package file can be referred to as shown in the following table: Table 2 Language package structure meaning table
[0047] In other embodiments of the present application, in the above-mentioned software internationalization processing method, one implementation of the step of updating the interface of the human-computer interaction software according to the language package file includes: S301. For the system-defined control element, use the Name attribute in Control as the index item, obtain the corresponding text data from the language pack file, and update the interface information corresponding to the system-defined control element; In S301, specifically, if ControlCollection is a system-defined control element, the Name attribute in Control is used as an index item (Key) to obtain corresponding text data from the language pack file to update the interface information corresponding to the system-defined control element. After switching the language, all system-defined control elements in the interface are switched to the corresponding language type.
[0048] S302. For the user-defined control element, according to the index item of the ControlCollection object method, the corresponding text data is obtained from the language pack file to update the interface information corresponding to the user-defined control element; In S302, specifically, if ControlCollection is a user-defined control element, it is necessary to obtain the corresponding text data from the language pack file according to the type of the user-defined control element (the index item Key of the ControlCollection object method) to update the interface information corresponding to the user-defined control element. After switching the language, all user-defined control elements in the interface are switched to the corresponding language type.
[0049] S303. For the interface text elements and the station map elements, use Name in ConstantInfo as the index item and obtain the corresponding text data from the language pack file to update the interface information corresponding to the interface text elements and the station map elements.
[0050] In S303, specifically, for interface text elements, Name in ConstantInfo can be used as an index item (Key) to obtain text data corresponding to the interface text elements from the language pack file, so as to update the interface information corresponding to the interface text elements; for station diagram elements, Name in ConstantInfo can be used as an index item (Key) to obtain text data corresponding to the station diagram elements from the language pack file, so as to update the interface information corresponding to the station diagram elements; after switching the language, all interface text elements and station diagram elements of the interface are switched to the corresponding language type.
[0051] Through the above embodiments, users can perfectly realize the automatic loading of language menus and hot switching. When adding languages, they only need to add language menu configuration files and language package files, and can realize automatic addition of languages without hard compiling programs, which greatly enhances the robustness of the software and reduces the cost of on-site manual upgrades. In addition, since the controls and text elements of the station map interface are data generated by other software, for the same version of software for different lines, after the data personnel have prepared the language menu configuration files and language package files, the station map display effect of the new language can be quickly generated.
[0052] In other embodiments of the present application, the software internationalization processing method further includes: S401. Get the pre-created voice package file according to the language type corresponding to the target submenu; In S401, specifically, in addition to the sound of the Class A alarm, there are also some special warnings on the human-computer interaction software interface, such as "broken filament", "emergency button parking activated" and other information also have sounds, and some user-defined prompt information can also pre-define the sound. Therefore, voice package files of multiple language types can be pre-recorded, and each language type of voice package file forms a separate folder, and the folder name is named according to the language rule; according to the language type corresponding to the target submenu, the voice package file with the same language type as the language type corresponding to the target submenu can be obtained; the voice package file can be stored in a preset database, and when switching languages, the human-computer interaction software can obtain the corresponding voice package file from the preset database, and this application does not impose specific restrictions on this.
[0053] S402. Obtain a voice broadcast instruction, and perform voice broadcast according to the voice broadcast instruction and the voice package file.
[0054] In S402, specifically, the voice broadcast instruction may be a voice broadcast control signal input by a user or a voice broadcast control signal automatically generated by human-computer interaction software; the human-computer interaction software may perform voice broadcast according to the voice broadcast instruction and the acquired voice package file.
[0055] Through the above implementation steps, the internationalization processing of the voice broadcast function of the human-computer interaction software is realized simply and efficiently.
[0056] like Figure 3 As shown, in another embodiment of the present application, a software internationalization processing system is also provided, which is applied to human-computer interaction software of a train automatic monitoring system, and the system includes: The first acquisition unit 10 is used to acquire a language menu configuration file pre-created to match the human-computer interaction software of the automatic train monitoring system; The loading unit 11 is used to load a language menu configuration file to add a language menu to the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, and the submenu corresponds to the switchable language type of the human-computer interaction software. In the initial state, the parent menu corresponds to the current language type of the human-computer interaction software as the default language type; A second acquisition unit 12 is used to acquire a language switching instruction for a language menu input by a user, wherein the language switching instruction is used to indicate a target submenu in at least one submenu in the language menu; The third acquisition unit 13 is used to acquire a pre-created language package file according to the language type corresponding to the target submenu; The updating unit 14 is used to update the interface of the human-computer interaction software according to the language package file, wherein the parent menu is updated to the language type corresponding to the target submenu, and the target submenu is updated to the language type corresponding to the parent menu before the update.
[0057] In other embodiments of the present application, in the software internationalization processing system, the interface of the human-computer interaction software includes interface control elements, interface text elements and station diagram elements; the software internationalization processing system also includes a construction unit for constructing a language package file, and the construction unit is specifically used to: Obtaining the properties of all elements in the interface of the human-computer interaction software, wherein the properties of the elements include the properties of the interface control elements, the properties of the interface text elements, and the properties of the station diagram elements; Obtain text data of a preset language type corresponding to an attribute of an element; Construct a language pack file in XML format based on the text data.
[0058] In other embodiments of the present application, in the above-mentioned software internationalization processing system, the interface control elements include system-defined control elements and user-defined control elements; the updating unit 14, when executing the updating of the interface of the human-computer interaction software according to the language package file, is specifically used to: For system-defined control elements, use the Name attribute in Control as the index item to obtain the corresponding text data from the language pack file to update the interface information corresponding to the system-defined control elements; For user-defined control elements, the corresponding text data is obtained from the language pack file according to the index item of the ControlCollection object method to update the interface information corresponding to the user-defined control element; For interface text elements and station diagram elements, use Name in ConstantInfo as the index item to obtain the corresponding text data from the language pack file to update the interface information corresponding to the interface text elements and station diagram elements.
[0059] In other embodiments of the present application, the software internationalization processing system further includes a broadcast unit, which is used to: According to the language type corresponding to the target submenu, obtain the pre-created voice package file; Get the voice broadcast command, and perform voice broadcast according to the voice broadcast command and voice package file.
[0060] like Figure 4 As shown, in another embodiment of the present application, a software internationalization processing terminal is also provided, including: a storage medium 20 and a processor 21; The storage medium 20 stores computer-executable instructions; The processor 21 executes the computer-executable instructions stored in the storage medium 20 to implement any of the above-mentioned software internationalization processing methods.
[0061] Among them, the processor 21 may include one or more processing cores. The processor 21 executes various functions and processes data of the present application by running or executing instructions, programs, code sets or instruction sets stored in the storage medium 20, calling data stored in the storage medium 20. The processor 21 can be at least one of a special application integrated circuit, a digital signal processor, a digital signal processing device, a programmable logic device, a field programmable gate array, a central processing unit, a controller, a microcontroller and a microprocessor. It can be understood that for different devices, the electronic device used to implement the functions of the above-mentioned processor 21 can also be other.
[0062] The storage medium 20 may be used to store instructions, programs, codes, code sets or instruction sets. The storage medium 20 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, and instructions for implementing any of the above-mentioned software internationalization processing methods, etc.; the data storage area may store data involved in any of the above-mentioned software internationalization processing methods, etc.
[0063] In another embodiment of the present application, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any of the above-mentioned software internationalization processing methods.
[0064] The computer-readable storage medium may be a USB flash drive, a mobile hard disk, a read-only memory, a random access memory, or a CD, etc., which may store program codes.
[0065] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A software internationalization processing method, characterized in that: Human-computer interaction software applied to a train automatic monitoring system, the method comprising: Obtain a language menu configuration file pre-created to match the human-machine interaction software of the automatic train monitoring system; Loading the language menu configuration file to add a language menu on the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, the submenu corresponds to the switchable language type of the human-computer interaction software, and in an initial state, the parent menu corresponds to the current language type of the human-computer interaction software as a default language type; Acquire a language switching instruction for the language menu input by a user, wherein the language switching instruction is used to indicate a target submenu in at least one of the submenus in the language menu; According to the language type corresponding to the target submenu, a pre-created language package file is obtained; The interface of the human-computer interaction software is updated according to the language pack file, wherein the parent menu is updated to the language type corresponding to the target submenu, and the target submenu is updated to the language type corresponding to the parent menu before being updated.
2. The method according to claim 1, characterized in that The interface of the human-computer interaction software includes interface control elements, interface text elements and station map elements; the language package file is constructed by the following steps: Acquire the properties of all elements in the interface of the human-computer interaction software, wherein the properties of the elements include the properties of interface control elements, the properties of interface text elements, and the properties of station diagram elements; Acquire text data of a preset language type corresponding to the attribute of the element; A language pack file in XML format is constructed according to the text data.
3. The method as claimed in claim 2, characterized in that The interface control elements include system-defined control elements and user-defined control elements; and updating the interface of the human-computer interaction software according to the language package file includes: For the system-defined control element, use the Name attribute in Control as an index item and obtain corresponding text data from the language pack file to update the interface information corresponding to the system-defined control element; For the user-defined control element, according to the index item of the ControlCollection object method, the corresponding text data is obtained from the language pack file to update the interface information corresponding to the user-defined control element; For the interface text element and the station map element, Name in ConstantInfo is used as an index item to obtain corresponding text data from the language pack file to update the interface information corresponding to the interface text element and the station map element.
4. The method according to claim 1, characterized in that Also includes: According to the language type corresponding to the target submenu, obtain a pre-created voice package file; Acquire a voice broadcast instruction, and perform voice broadcast according to the voice broadcast instruction and the voice package file.
5. A software internationalization processing system, characterized in that: Human-computer interaction software for a train automatic monitoring system, the system comprising: A first acquisition unit is used to acquire a language menu configuration file pre-created to match the human-computer interaction software of the train automatic monitoring system; A loading unit, used to load the language menu configuration file to add a language menu to the interface of the human-computer interaction software, wherein the language menu includes a parent menu and at least one submenu, the parent menu corresponds to the current language type of the human-computer interaction software, the submenu corresponds to the switchable language type of the human-computer interaction software, and in an initial state, the parent menu corresponds to the current language type of the human-computer interaction software as a default language type; A second acquiring unit, configured to acquire a language switching instruction for the language menu input by a user, wherein the language switching instruction is used to indicate a target submenu in at least one of the submenus in the language menu; A third acquisition unit, configured to acquire a pre-created language package file according to the language type corresponding to the target submenu; An updating unit is used to update the interface of the human-computer interaction software according to the language pack file, wherein the parent menu is updated to the language type corresponding to the target submenu, and the target submenu is updated to the language type corresponding to the parent menu before updating.
6. The system as claimed in claim 5, characterized in that The interface of the human-computer interaction software includes interface control elements, interface text elements and station map elements; the software internationalization processing system also includes a construction unit for constructing the language package file. When executing the construction of the language package file, the construction unit is specifically used to: Acquire the properties of all elements in the interface of the human-computer interaction software, wherein the properties of the elements include the properties of interface control elements, the properties of interface text elements, and the properties of station diagram elements; Acquire text data of a preset language type corresponding to the attribute of the element; A language pack file in XML format is constructed according to the text data.
7. The system as claimed in claim 6, characterized in that The interface control elements include system-defined control elements and user-defined control elements; the updating unit, when executing the updating of the interface of the human-computer interaction software according to the language package file, is specifically used to: For the system-defined control element, use the Name attribute in Control as an index item and obtain corresponding text data from the language pack file to update the interface information corresponding to the system-defined control element; For the user-defined control element, according to the index item of the ControlCollection object method, the corresponding text data is obtained from the language pack file to update the interface information corresponding to the user-defined control element; For the interface text element and the station map element, Name in ConstantInfo is used as an index item to obtain corresponding text data from the language pack file to update the interface information corresponding to the interface text element and the station map element.
8. The system as claimed in claim 5, characterized in that It also includes a broadcast unit, which is used to: According to the language type corresponding to the target submenu, obtain a pre-created voice package file; Acquire a voice broadcast instruction, and perform voice broadcast according to the voice broadcast instruction and the voice package file.
9. A software internationalization processing terminal, characterized in that: include: Storage media and processors; The storage medium stores computer-executable instructions; The processor executes the computer-executable instructions stored in the storage medium to implement the method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.
