International language package updating method of application program and electronic equipment
By setting up a preset interface between cloud devices and terminal devices, new international language packs are automatically sent for updates, solving the problems of manual operation and release in existing technologies and improving the user experience.
Patent Information
- Application Number
- CN202510885552.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-11-11
AI Technical Summary
In existing technologies, application language updates require manual operation by the user, resulting in a poor user experience. Furthermore, language file updates require a new version release and reinstallation of the package.
A preset interface is set up between cloud devices and terminal devices. By receiving language pack update requests, new international language packs are automatically sent for updates, avoiding manual operation and release process for users.
Automatic updates to the application's language pack have been implemented, improving the user experience and reducing cumbersome steps and waiting time.
Smart Images

Figure CN120929098A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mobile communication technology. More specifically, it relates to a method for updating international language packs for an application and an electronic device. Background Technology
[0002] With the globalization of mobile applications, application internationalization has become a core development requirement. Therefore, applications need to be configured with different international languages to enhance their applicability.
[0003] Currently, by embedding static language files in the application's installation package, which contain text in multiple international languages, the text displayed on the application's interface is derived from these static language files, allowing the application interface to display text in different international languages.
[0004] However, embedding language files in the application's installation package requires a new version release when the language file is updated. This necessitates the terminal device downloading the new installation package and installing the application using the new package before the application's language can be updated. This language update process requires manual user intervention, which is cumbersome and results in a poor user experience. Summary of the Invention
[0005] This application provides a method and electronic device for updating the international language pack of an application. It can send the new international language pack to the terminal device when the application starts or switches languages, thereby updating the application language without the need for a new version or manual operation by the user, which can effectively improve the user experience.
[0006] In a first aspect, embodiments of this application provide a method for updating the international language pack of an application, applied to a cloud device, the method comprising:
[0007] When a language pack update request is received from a terminal device via a preset interface, the system determines whether the language pack used by the terminal device needs to be updated based on the language pack update request and the new international language pack. The language pack update request is sent by the terminal device when it launches the target application or when it switches the language of the target application. The new international language pack is obtained by updating the language of the target application.
[0008] When the language pack used by the terminal device needs to be updated, the new international language pack is sent to the terminal device through the preset interface, so that the terminal device updates the language of the target application based on the new international language pack.
[0009] In this application, when the language pack of the cloud device is updated, the terminal device can receive the language pack update request sent by the terminal device through a preset interface when the target application is launched or the language of the target application is switched. Based on the request, the new international language pack is sent to the terminal device through the preset interface so that the new international language pack can be applied on the terminal device. This achieves the goal of updating the international language pack without the need for a new version or manual operation by the user, thereby improving the user experience.
[0010] In some embodiments of this application, determining whether the language pack used by the terminal device needs to be updated based on the language pack update request and the new international language pack includes:
[0011] The first version number carried in the language pack update request is compared with the second version number of the new international language pack; the second version number is generated when the new international language pack is generated.
[0012] When the first version number is different from the second version number, it is determined that the language pack used by the terminal device needs to be updated;
[0013] When the first version number is the same as the second version number, it is determined that the language pack used by the terminal device does not need to be updated.
[0014] In this application, the version number is used to determine whether the language pack used by the terminal device needs to be updated, which makes the determination of whether the language pack used by the terminal device needs to be updated more accurate.
[0015] In some embodiments of this application, the method further includes:
[0016] Retrieve updated text for the target application's language;
[0017] The updated text is translated and corrected to obtain multiple international language texts corresponding to the updated text, and a new international language pack is generated.
[0018] In this application, the final international language text is obtained through translation and correction, resulting in higher accuracy of the various international language texts, that is, higher accuracy of the new international language package.
[0019] In some embodiments of this application, the new international language pack is an incremental international language pack;
[0020] The process of translating and correcting the updated text to obtain multiple international language texts corresponding to the updated text, and generating a new international language package, includes:
[0021] The updated text is translated using a translation engine to obtain key-value pairs corresponding to multiple international language texts.
[0022] The key-value pairs are corrected to obtain corrected key-value pairs;
[0023] Based on the corrected key-value pairs, a new international language pack in a preset format is generated, wherein the preset format is a format that can be parsed by various types of terminal devices.
[0024] In this application, by generating incremental international language packs, the incremental international language packs can be sent to the terminal device, enabling the terminal device to incrementally update the language packs, thereby improving the speed of language pack updates and enhancing the user experience.
[0025] In some embodiments of this application, the new international language pack is a full international language pack;
[0026] The process of translating and correcting the updated text to obtain multiple international language texts corresponding to the updated text, and generating a new international language package, includes:
[0027] The updated text in the language is translated using a translation engine to obtain key-value pairs in multiple international languages corresponding to the updated text;
[0028] The key-value pairs are corrected to obtain corrected key-value pairs;
[0029] The corrected key-value pairs are merged with the latest international language pack stored on the cloud device to generate a full international language pack in a preset format, which is a format that can be parsed by multiple user terminal platforms.
[0030] In this application, a language pack in a format that can be parsed by multiple user platforms is generated, enabling the new language pack to be applicable to different platforms. Furthermore, by generating a full international language pack, it is possible to subsequently send the full international language pack to the terminal device, allowing the terminal device to update the entire language pack.
[0031] In some embodiments of this application, the method further includes:
[0032] When the updated text includes the target text, after generating the new international language pack, the new international language pack is sent to the terminal device running the target application through a preset interface, so that the terminal device updates the language of the target application based on the new international language pack; the target text is the text obtained by modifying the erroneous language text in the latest international language pack currently stored.
[0033] In this application, when there are erroneous language texts in the current international language pack, after the cloud device modifies the error, the modified new international language pack is actively pushed to the terminal device, so that the correction can be quickly corrected on the target application of the terminal device, thereby improving the user experience.
[0034] Secondly, this application provides a method for updating the international language pack of an application, applied to a terminal device, comprising:
[0035] When a target instruction is received for a target application, the target interface corresponding to the target instruction is displayed, and a language pack update request is sent to the cloud device through a preset interface, so that the cloud device can determine whether the language pack used by the terminal device needs to be updated based on the language pack update request; the target interface includes text from the target application's current local international language pack, and the target instruction is used to launch the target application, or to switch the language of the target application;
[0036] The terminal device receives a new international language pack sent by the cloud device through the preset interface. The new international language pack is sent to the terminal device by the cloud device when it determines that the language pack used by the terminal device needs to be updated.
[0037] The local international language pack is updated according to the new international language pack to obtain the target international language pack;
[0038] Refresh the target interface to update the text in the target interface from the local international language pack to the text from the target international language pack.
[0039] In this application, when the target application is launched on the terminal device, or when the language of the target application is switched, the target interface based on the current local language pack is first displayed. After the new international language pack is obtained, the interface is refreshed to update the language of the target interface to the language of the new international language pack. This reduces the user's waiting time, and the update of the international language pack does not require manual operation by the user, effectively improving the user experience.
[0040] In some embodiments of this application, the new international language pack is an incremental international language pack, which includes updated text and multiple international language texts corresponding to the updated text;
[0041] The step of updating the local international language pack according to the new international language pack to obtain the target international language pack includes:
[0042] The incremental international language pack is parsed using Flutter to obtain the parsed incremental international language pack, and the format of the parsed incremental international language pack is the format corresponding to the user terminal platform to which the terminal device belongs;
[0043] The parsed incremental international language pack is merged with the local international language pack to obtain the target international language pack.
[0044] In this application, incremental international language packs are parsed to obtain language packs in a format corresponding to the terminal device's platform, and then merged with local language packs to obtain the target international language pack. This reduces the time spent parsing language packs transmitted from cloud devices.
[0045] In some embodiments of this application, the new international language pack is a full international language pack, which includes updated text, multiple international language texts corresponding to the updated text, unupdated text, and multiple international language texts corresponding to the unupdated text.
[0046] The step of updating the local international language pack according to the new international language pack to obtain the target international language pack includes:
[0047] The target international language pack is obtained by parsing the full international language pack using Flutter. The format of the target international language pack is the same as that of the user platform to which the terminal device belongs.
[0048] In this application, incremental international language packs are parsed to obtain language packs in a format corresponding to the platform of the terminal device, so that subsequent target applications can use the parsed target international language packs.
[0049] In some embodiments of this application, the method further includes:
[0050] During the operation of the target application, a new international language pack sent by the cloud device is received through the preset interface; the new international language pack is generated by the cloud device based on the updated text when the updated text includes the target text; the target text is text obtained by modifying erroneous language text in the latest international language pack stored by the cloud device.
[0051] The local international language pack is updated according to the new international language pack to obtain the target international language pack.
[0052] In this application, when an error occurs in the language text of the target application, a new international language pack can be received from the cloud device, enabling the terminal device to update its local international language pack as quickly as possible based on the international language pack that corrects the error from the cloud device.
[0053] Thirdly, this application provides an international language pack update device for an application, comprising:
[0054] The determination module is used to determine whether the language pack used by the terminal device needs to be updated when a language pack update request is received from the terminal device through a preset interface, based on the language pack update request and a new international language pack; the language pack update request is sent by the terminal device when the terminal device starts the target application, or when the language of the target application is switched; the new international language pack is obtained by updating the language of the target application.
[0055] The sending module is used to send the new international language pack to the terminal device through the preset interface when the language pack used by the terminal device needs to be updated, so that the terminal device can update the language of the target application based on the new international language pack.
[0056] In some embodiments of this application, the determining module is specifically used to compare a first version number carried in the language pack update request with a second version number of the new international language pack; the second version number is generated when the new international language pack is generated; when the first version number is different from the second version number, it is determined that the language pack used by the terminal device needs to be updated; when the first version number is the same as the second version number, it is determined that the language pack used by the terminal device does not need to be updated.
[0057] In some embodiments of this application, the international language pack update device for the application further includes a processing module, which is used to obtain updated text for the target application's language; perform translation and correction processing on the updated text to obtain multiple international language texts corresponding to the updated text, and generate a new international language pack.
[0058] In some embodiments of this application, the new international language pack is an incremental international language pack; the processing module is specifically used to translate the updated text using a translation engine to obtain key-value pairs corresponding to multiple international language texts corresponding to the updated text; to perform correction processing on the key-value pairs to obtain corrected key-value pairs; and to generate a new international language pack in a preset format based on the corrected key-value pairs, wherein the preset format is a format that can be parsed by multiple types of terminal devices.
[0059] In some embodiments of this application, the new international language pack is a full international language pack; the processing module is specifically used to translate the language update text using a translation engine to obtain key-value pairs corresponding to multiple international languages for the update text; to perform correction processing on the key-value pairs to obtain corrected key-value pairs; and to merge the corrected key-value pairs with the latest international language pack stored on the cloud device to generate a full international language pack in a preset format, wherein the preset format is a format that can be parsed by multiple user terminal platforms.
[0060] In some embodiments of this application, the sending module is further configured to, when the updated text includes target text, send the new international language pack to a terminal device running the target application through a preset interface after generating the new international language pack, so that the terminal device updates the language of the target application based on the new international language pack; the target text is text obtained by modifying erroneous language text in the latest international language pack currently stored.
[0061] Fourthly, this application provides an international language pack update device for an application, comprising:
[0062] The display module is used to display the target interface corresponding to the target instruction when a target instruction for the target application is received, and to send a language pack update request to the cloud device through a preset interface, so that the cloud device can determine whether the language pack used by the terminal device needs to be updated based on the language pack update request; the target interface includes text from the current local international language pack of the target application, and the target instruction is used to start the target application, or to switch the language of the target application;
[0063] The receiving module is used to receive a new international language pack sent by the cloud device through the preset interface. The new international language pack is sent to the terminal device by the cloud device when it determines that the language pack used by the terminal device needs to be updated.
[0064] The update module is used to update the local international language pack according to the new international language pack to obtain the target international language pack;
[0065] The display module is also used to refresh the target interface to update the text in the target interface from the local international language pack to the text from the target international language pack.
[0066] In some embodiments of this application, the new international language pack is an incremental international language pack, which includes updated text and multiple international language texts corresponding to the updated text; the update module is specifically used to parse the incremental international language pack using Flutter to obtain a parsed incremental international language pack, the format of which is the format corresponding to the user terminal platform to which the terminal device belongs; and to merge the parsed incremental international language pack with the local international language pack to obtain the target international language pack.
[0067] In some embodiments of this application, the new international language pack is a full international language pack, which includes updated text, multiple international language texts corresponding to the updated text, unupdated text, and multiple international language texts corresponding to the unupdated text; the update module is specifically used to parse the full international language pack using Flutter to obtain the target international language pack, wherein the format of the target international language pack is the format corresponding to the user terminal platform to which the terminal device belongs.
[0068] In some embodiments of this application, the receiving module is further configured to receive, during the operation of the target application, a new international language pack sent by the cloud device through the preset interface; the new international language pack is generated by the cloud device based on the updated text when the updated text includes the target text; the target text is text obtained by modifying erroneous language text in the latest international language pack stored by the cloud device.
[0069] The update module is also used to update the local international language pack according to the new international language pack to obtain the target international language pack.
[0070] Fifthly, this application provides an electronic device, including: a memory and a processor;
[0071] The memory stores computer-executed instructions;
[0072] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in the first aspect and any of the embodiments of the first aspect, or the method as described in the second aspect and any of the embodiments of the second aspect.
[0073] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a computer, are used to implement the methods described in the first aspect and any of the embodiments of the first aspect, or the methods described in the second aspect and any of the embodiments of the second aspect.
[0074] The computer-readable storage medium provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0075] In a seventh aspect, this application provides a computer program product, including a computer program, which, when executed by a computer, is used to implement the methods described in the first aspect and any of the embodiments of the first aspect, or the methods described in the second aspect and any of the embodiments of the second aspect.
[0076] The computer program product provided in this application embodiment can execute the technical solutions in the above method embodiments, and its beneficial effects are similar, so they will not be described again here.
[0077] This application provides a method and electronic device for updating an international language pack for an application. The method includes: when a language pack update request is received from a terminal device via a preset interface, determining whether the language pack used by the terminal device needs to be updated based on the language pack update request and a new international language pack; the language pack update request is sent by the terminal device when it launches the target application or when it switches the language of the target application; the new international language pack is obtained by updating the language of the target application; when the language pack used by the terminal device needs to be updated, the new international language pack is sent to the terminal device via the preset interface, so that the terminal device updates the language of the target application based on the new international language pack. In this way, after the language pack of the cloud device is updated, the method can receive the language pack update request from the terminal device when it launches the target application or switches the language of the target application, and send the new international language pack to the terminal device via the preset interface based on the request, so that the new international language pack can be applied on the terminal device. This achieves international language pack updates without the need for release updates or manual user operation, thus improving the user experience. Attached Figure Description
[0078] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0079] Figure 1 This is a schematic diagram of a scenario for an application's international language pack update method according to some embodiments;
[0080] Figure 2 This is a flowchart illustrating an international language pack update method for an application according to some embodiments;
[0081] Figure 3 This is a flowchart illustrating a method for generating a new international language pack according to some embodiments;
[0082] Figure 4 This is a flowchart illustrating an international language pack update method for another application according to some embodiments;
[0083] Figure 5 This is a schematic diagram of the interface of a target application before and after a language pack update, according to some embodiments.
[0084] Figure 6 This is a schematic diagram of the interface of a target application before and after an update to another language pack, according to some embodiments.
[0085] Figure 7 This is a flowchart illustrating an international language pack update method for another application according to some embodiments;
[0086] Figure 8 This is a schematic diagram of the structure involved in the international language pack update process of an application according to some embodiments;
[0087] Figure 9 This is a schematic diagram of the structure of an international language pack update device for an application according to some embodiments;
[0088] Figure 10 A schematic diagram of the structure of an international language pack update device for another application according to some embodiments;
[0089] Figure 11 This is a schematic diagram of the structure of an electronic device according to some embodiments. Detailed Implementation
[0090] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only some embodiments of this application, and not all embodiments.
[0091] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0092] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclusively include, for example, a product or device that includes a series of components is not necessarily limited to those that are explicitly listed, but may include other components that are not explicitly listed or that are inherent to such product or device.
[0093] With the globalization of mobile applications, application internationalization has become a core development requirement. Therefore, applications need to be configured with different international languages to enhance their applicability.
[0094] In some implementations, a static language file containing text in multiple international languages is embedded in the application's installation package. When the application displays the interface, the text on the interface is obtained from the static language file, allowing the text displayed on the application interface to be in different international languages.
[0095] However, embedding language files in the application's installation package requires a new version release when those language files are updated. This necessitates the terminal device downloading the new installation package and installing the application using the new package before the application's language can be updated. This process requires manual intervention from the user, is cumbersome, and results in a poor user experience.
[0096] In other implementations, language resources are decoupled from code logic, and pre-compiled templates are used to generate multilingual UI components, supporting dynamic replacement of text content.
[0097] However, in the above implementation, the language files still need to be included in the application's installation package, and updating the language still requires downloading the entire application again. The language update process is cumbersome, resulting in a poor user experience.
[0098] Based on this, this application provides a method for updating international language packs for applications, which establishes a preset interface for interaction between cloud devices and terminal devices. When the language pack is updated on the cloud device, when the target application is launched or its language is switched on the terminal device, a language pack update request sent by the terminal device can be received through the preset interface. Based on this request, the new international language pack is sent to the terminal device through the preset interface, enabling the new international language pack to be applied on the terminal device. This achieves international language pack updates without requiring a new release or manual user intervention, thus improving the user experience.
[0099] The technical solutions of this application will be described in detail below with reference to specific embodiments. The following specific embodiments can be combined with each other or exist independently. The same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0100] First, the application scenarios will be explained. Figure 1 This is a schematic diagram of a scenario for updating the international language pack of an application according to some embodiments.
[0101] like Figure 1 As shown, cloud devices and terminal devices can interact through a pre-defined interface. The terminal device can send a language pack update request to the cloud device via this interface. Upon receiving the request, the cloud device determines whether the terminal device's international language pack needs updating, specifically whether the terminal device is currently using the latest version. If not, the cloud device sends the latest version of the international language pack to the terminal device via the pre-defined interface, enabling the terminal device to update the target application's language based on this latest version.
[0102] The following describes the international language pack update method for the application provided in this application embodiment from the perspectives of cloud devices and terminal devices, respectively.
[0103] The international language pack update method for applications provided in this application embodiment, when applied to cloud devices, can be found in [reference needed]. Figure 2 As shown, Figure 2 This is a flowchart illustrating an international language pack update method for an application according to some embodiments.
[0104] like Figure 2 As shown, the application's international language pack update methods include:
[0105] S201. When a language pack update request is received from a terminal device through a preset interface, determine whether the language pack used by the terminal device needs to be updated based on the language pack update request and the new international language pack.
[0106] For example, the preset interface can be a RESTful interface provided by an Application Programming Interface (API) gateway. It can also be other types of interfaces; this embodiment does not specifically limit this.
[0107] The language pack update request is sent by the terminal device when it launches the target application or when it switches the language of the target application; the new international language pack is obtained by updating the language of the target application.
[0108] In this application, determining whether the language pack used by the terminal device needs to be updated based on the language pack update request includes: comparing a first version number carried in the language pack update request with a second version number of the new international language pack; the second version number is generated when the new international language pack is generated; when the first version number and the second version number are different, it is determined that the language pack used by the terminal device needs to be updated; when the first version number and the second version number are the same, it is determined that the language pack used by the terminal device does not need to be updated.
[0109] For example, the version number can be represented by numbers such as 1.0, 2.0, or it can be represented in other ways. This application embodiment does not limit the version number.
[0110] When the first version number is different from the second version number, it can be determined that the language pack used by the terminal device needs to be updated, that is, the international language pack currently used by the terminal device is not the latest version, and the following S202 can be executed.
[0111] When the first version number is the same as the second version number, it can be determined that the language pack used by the terminal device does not need to be updated, that is, the international language pack currently used by the terminal device is the latest version. In this case, no action needs to be taken, or a message can be sent to the terminal device that the language pack does not need to be updated.
[0112] In this way, determining whether the language pack used by the terminal device needs to be updated by using the version number makes the determination of whether the language pack used by the terminal device needs to be updated more accurate.
[0113] S202. When the language pack used by the terminal device needs to be updated, a new international language pack is sent to the terminal device through a preset interface so that the terminal device can update the language of the target application based on the new international language pack.
[0114] Thus, the international language pack update method for applications provided in this application can receive a language pack update request sent by the terminal device through a preset interface when the language pack of the cloud device is updated, or when the target application is launched or the language of the target application is switched on the terminal device. Based on the request, the method can send a new international language pack to the terminal device through the preset interface, so that the new international language pack can be applied on the terminal device. This achieves the goal of updating the international language pack without the need for a new version or manual operation by the user, thereby improving the user experience.
[0115] In this application, the method for generating new international language packs using cloud devices can be found in [reference needed]. Figure 3 As shown, Figure 3 This is a schematic diagram of a method for generating a new international language pack according to some embodiments.
[0116] like Figure 3 As shown, methods for generating new international language packs include:
[0117] S301. Obtain the updated text for the target application's language.
[0118] For example, the updated text may be an update to an existing language in the target application, such as changing "Hello" to "Hi" on a certain display screen of the application. Alternatively, it may be newly added text. This application does not specifically limit the updated text.
[0119] The updated text can be in Chinese, English, or other international languages. This application does not specifically limit the language of the updated text.
[0120] S302. Translate the updated text to obtain the corresponding international language text.
[0121] For example, cloud devices can use API calls to machine translation engines to translate updated text and obtain the updated text in multiple international languages.
[0122] Machine translation engines can integrate Google Translate, DeepL, etc., and this application does not specifically limit the machine translation engine.
[0123] For example, the multilingual text translated by a machine translation engine can be a key-value pair structure.
[0124] S303. Correct and process multiple international language texts to obtain a new international language package.
[0125] In this application, multiple international language texts can be corrected using a pre-defined correction method, or multiple international language texts can be corrected using a manual correction method. This application does not limit the scope of the embodiments.
[0126] For example, the machine translation engine can annotate the texts in multiple international languages, marking any potentially erroneous content. During subsequent correction processing, only the marked content can be corrected, which can improve the speed of correction.
[0127] In this way, the final international language text is obtained through translation and correction, resulting in higher accuracy of the various international language texts, that is, higher accuracy of the new international language package.
[0128] In this application, the updated text undergoes translation and correction processing to obtain multiple international language texts corresponding to the updated text, and a new international language pack is generated. This can include the following two possible implementations:
[0129] One possible implementation is that the new international language pack is an incremental international language pack.
[0130] The updated text is translated and corrected to obtain multiple international language texts corresponding to the updated text, and a new international language package is generated. This includes: translating the updated text using a translation engine to obtain key-value pairs corresponding to the multiple international language texts; correcting the key-value pairs to obtain corrected key-value pairs; and generating a new international language package in a preset format based on the corrected key-value pairs. The preset format is a format that can be parsed by multiple types of terminal devices.
[0131] For example, the preset format can be JSON format, but this application embodiment does not limit it.
[0132] In this way, by generating language packs in a format that can be parsed by multiple user platforms, the new language packs can be adapted to different platforms. Furthermore, by generating incremental international language packs, these incremental international language packs can be sent to terminal devices, allowing for incremental updates and improving the speed of language pack updates on terminal devices, thus enhancing the user experience.
[0133] Another possible implementation is a new international language pack for all international languages.
[0134] It should be noted that the full international language pack refers to the complete international language pack for the target application.
[0135] The updated text is translated and corrected to obtain multiple international language texts corresponding to the updated text, and a new international language package is generated. This includes: translating the updated text using a translation engine to obtain key-value pairs corresponding to multiple international languages; correcting the key-value pairs to obtain corrected key-value pairs; and merging the corrected key-value pairs with the latest international language package stored on the cloud device to generate a full international language package in a preset format that can be parsed by multiple user platforms.
[0136] In this way, by generating language packs in a format that can be parsed by multiple user platforms, the new language packs can be adapted to different platforms. Furthermore, by generating a complete international language pack, it is possible to subsequently send the complete international language pack to the terminal device, allowing the terminal device to update the entire language pack.
[0137] In this application, when the updated text includes the target text, after generating a new international language pack, the new international language pack is sent to the terminal device running the target application through a preset interface, so that the terminal device updates the language of the target application based on the new international language pack; the target text is the text obtained by modifying the erroneous language text in the latest international language pack currently stored.
[0138] For example, the erroneous language text in the latest international language pack currently stored may be typos, or errors in sentence structure, etc. This application embodiment does not limit the types of errors.
[0139] In this way, when there are erroneous language texts in the current international language pack, after the cloud device corrects the error, the new international language pack is actively pushed to the terminal device, so that the correction can be quickly corrected on the target application on the terminal device, thereby improving the user experience.
[0140] The international language pack update method for applications provided in this application embodiment, when applied to terminal devices, can be found in [reference needed]. Figure 4 As shown, Figure 4 This is a flowchart illustrating an international language pack update method for another application according to some embodiments.
[0141] like Figure 4 As shown, the application's international language pack update methods include:
[0142] S401. When a target instruction for a target application is received, the target interface corresponding to the target instruction is displayed, and a language pack update request is sent to the cloud device through a preset interface, so that the cloud device can determine whether the language pack used by the terminal device needs to be updated based on the language pack update request.
[0143] The target interface includes text from the target application's current local international language pack.
[0144] The target instruction is used to launch the target application, or to switch the language of the target application.
[0145] For example, switching the language of the target application from English to Chinese. This application does not specifically limit the language switching of the target application.
[0146] Understandably, when the target instruction is to launch the target application, the target interface can be the interface displayed when the target application is launched. When the target instruction is to switch the language of the target application, the target interface can be the interface after the language switch.
[0147] S402. Receive a new international language pack sent by the cloud device through a preset interface. The new international language pack is sent by the cloud device to the terminal device when it determines that the language pack used by the terminal device needs to be updated.
[0148] The method for cloud devices to determine whether the language pack used by a terminal device needs to be updated can be found in the above embodiments, and will not be repeated here.
[0149] The preset interface can be found in the above embodiments, and will not be repeated here.
[0150] S403. Update the local international language pack according to the new international language pack to obtain the target international language pack.
[0151] S404. Refresh the target interface to update the text in the target interface from the local international language pack to the text from the target international language pack.
[0152] It should be noted that the text displayed on the target interface after the refresh is the text of the target international language pack.
[0153] In this way, when the target application is launched on the terminal device, or when the language of the target application is switched, the target interface based on the current local language pack is displayed first. After the new international language pack is obtained, the interface is refreshed to update the language of the target interface to the language of the new international language pack. This reduces the user's waiting time, and the update of the international language pack does not require manual operation by the user, which effectively improves the user experience.
[0154] In this application, the local international language pack is updated according to the new international language pack to obtain the target international language pack, which may include the following two possible implementations:
[0155] One possible implementation is that the new international language pack is an incremental international language pack, which includes the updated text and the corresponding international language texts.
[0156] The local international language pack is updated based on the new international language pack to obtain the target international language pack. This includes: parsing the incremental international language pack using Flutter to obtain the parsed incremental international language pack, the format of which is the format corresponding to the user platform to which the terminal device belongs; and merging the parsed incremental international language pack with the local international language pack to obtain the target international language pack.
[0157] The parsed incremental international language pack is merged with the local international language pack to obtain the target international language pack. Alternatively, the content corresponding to the incremental international language pack in the local international language pack can be deleted, and the incremental international language pack can be added to the deleted local international language pack to obtain the target international language pack, so that the obtained target international language pack is the complete language pack of the target application.
[0158] In this way, by parsing the incremental international language pack, a language pack in a format corresponding to the terminal device's platform is obtained, and then merged with the local language pack to obtain the target international language pack. This reduces the time spent parsing language packs transmitted from cloud devices, making it easier for subsequent target applications to use the parsed target international language pack.
[0159] Another possible implementation is that the new international language pack is a full international language pack, which includes updated text, multiple international language texts corresponding to the updated text, unupdated text, and multiple international language texts corresponding to the unupdated text.
[0160] The local international language pack is updated based on the new international language pack to obtain the target international language pack. This includes parsing the full international language pack using Flutter to obtain the target international language pack. The format of the target international language pack is the format corresponding to the user platform to which the terminal device belongs.
[0161] Based on the above embodiments, the full international language pack is the complete international language pack of the target application. Therefore, after parsing the full international language pack, the target international language pack can be directly obtained. The target international language pack can then replace the previously cached local international language pack.
[0162] In this way, by parsing the incremental international language pack, a language pack in a format corresponding to the platform of the terminal device is obtained, so that the target application can use the parsed target international language pack.
[0163] In this application, during the operation of the target application, a new international language pack sent by a cloud device is received through a preset interface; the new international language pack is generated by the cloud device based on the updated text when the updated text includes the target text; the target text is the text obtained by modifying the erroneous language text in the latest international language pack stored by the cloud device; the local international language pack is updated according to the new international language pack to obtain the target international language pack.
[0164] In this way, when an error occurs in the language text of the target application, a new international language pack can be received from the cloud device, enabling the terminal device to update its local international language pack as quickly as possible based on the international language pack that corrects the error from the cloud device.
[0165] Figure 5 This is a schematic diagram of the interface of a target application before and after a language pack update, according to some embodiments.
[0166] like Figure 5 As shown in (a) above, before the language pack update, the target application's display screen showed the text "Hello". Figure 5 As shown in (b), after the language pack is updated, the text displayed on the target application's screen is "Hi".
[0167] Figure 6 This is a schematic diagram of the target application's interface before and after an update to another language pack, according to some embodiments.
[0168] like Figure 6 As shown in (a), before the language pack update, the target application's display showed the text "Please wait a short while," with an error in the word "short." After the cloud device corrected this text, the terminal device could receive the new international language pack pushed by the cloud device. Figure 6 As shown in (b), after the language pack is updated, the target application's display screen shows the text "Please wait for a while".
[0169] Taking the switching of the target application's language on a terminal device as an example, the method for updating the international language pack of an application executed on the terminal device side is explained. (See also...) Figure 7 As shown, Figure 7 This is a flowchart illustrating an international language pack update method for another application according to some embodiments.
[0170] like Figure 7 As shown, when a terminal device switches languages, it can first display the interface after the language switch. The language text in the interface is displayed based on the locally cached international language pack. A preset interface is requested from the cloud device to request a new international language pack. The method for the terminal device to request a new international language pack from the cloud device can be found in the above embodiments and will not be repeated here.
[0171] Furthermore, the terminal device determines whether the request for a new international language pack from the cloud device was successful. If unsuccessful, it can continue loading the local international language pack to display the interface. If successful, it checks if there is a local language pack update record. If not, it updates the language pack update record. If there is, it further checks if the new international language pack matches the locally cached international language pack. If they match, it means the language pack has not been updated, and the local international language pack is loaded. If they do not match, the language pack update record is updated.
[0172] It should be noted that, based on the above embodiments, the cloud device sends a new international language pack to the terminal device only if it determines that the terminal device needs to update the language pack. Therefore, the terminal device may also omit the step of determining whether the new international language pack is consistent with the locally cached international language pack, and this application embodiment does not limit this.
[0173] After the terminal device updates the language pack update record, it can parse the new international language pack and merge the parsed new international language pack with the locally cached international language pack. The merging method can be found in the above embodiments and will not be repeated here.
[0174] The terminal device refreshes the display interface and updates the language text using the integrated international language pack, thus updating the language pack of the terminal device.
[0175] Based on the above embodiments, the method for updating the international language pack of the application provided in this application will be described below, using cloud devices and terminal devices.
[0176] Figure 8 This is a schematic diagram of the structure involved in the international language pack update process of an application according to some embodiments.
[0177] like Figure 8 As shown, the cloud platform triggers a task to update the language for the target application. The machine translation engine uses API calls to Google Translate, DeepL, and other tools to translate the text. The translated text is then sent to a human correction platform for manual correction based on annotations. The annotations are described in the previous embodiments and will not be repeated here. After manual correction, standardized language text is obtained, which is a key-value pair structure.
[0178] Furthermore, by storing key-value pairs in JSON format through cloud-based multilingual storage, a new international language pack is obtained, and the version of the international language pack is changed to the new version.
[0179] For example, cloud devices can store language text in key-value pair structures based on NoSQL databases such as MongoDB.
[0180] When a terminal device launches the target application or switches the language of the target application, a version check can be performed. This version check involves sending a language pack update request to the cloud device via a preset interface. The cloud device, based on the version of the local international language pack currently used by the terminal device and the version of the new international language pack carried in the update request, determines whether the terminal device needs to update the international language pack. If the versions are inconsistent, it can be determined that the terminal device needs to update the international language pack. In this case, the cloud device can send the new international language pack to the terminal device. The terminal device parses and loads the new international language pack, and then refreshes the target application's display interface to update the language and text displayed on the screen.
[0181] When the versions are consistent, it can be determined that the terminal device does not need to update the international language pack, and the locally cached international language pack can continue to be used.
[0182] In this way, cloud devices centrally store multilingual files using a key-value pair structure, manage change history through version numbers, and support incremental updates and rollbacks. Furthermore, it integrates machine translation APIs (such as Google Translate) to generate basic translations, combined with a human proofreading interface to correct semantics, forming a "machine + human" dual-engine driven translation process that improves translation accuracy and efficiency. When the target application on the terminal device starts, it loads the local cache, asynchronously detects version differences in the cloud, and refreshes language resources in real time through Flutter's Localizations framework without requiring an application restart. This effectively enhances the user experience.
[0183] Figure 9 This is a schematic diagram of the structure of an international language pack update device for an application according to some embodiments. Figure 9 As shown, the device may include: a determining module 901, a sending module 902, and a processing module 903, wherein:
[0184] The determination module 901 is used to determine whether the language pack used by the terminal device needs to be updated when a language pack update request is received from the terminal device through a preset interface, based on the language pack update request and the new international language pack. The language pack update request is sent by the terminal device when it starts the target application or when it switches the language of the target application. The new international language pack is obtained by updating the language of the target application.
[0185] The sending module 902 is used to send a new international language pack to the terminal device through a preset interface when the language pack used by the terminal device needs to be updated, so that the terminal device can update the language of the target application based on the new international language pack.
[0186] In some embodiments of this application, the determining module 901 is specifically used to compare a first version number carried in the language pack update request with a second version number of the new international language pack; the second version number is generated when the new international language pack is generated; when the first version number and the second version number are different, it is determined that the language pack used by the terminal device needs to be updated; when the first version number and the second version number are the same, it is determined that the language pack used by the terminal device does not need to be updated.
[0187] In some embodiments of this application, the international language pack update device for the application further includes a processing module 903, which is used to obtain updated text for the target application's language; perform translation and correction processing on the updated text to obtain multiple international language texts corresponding to the updated text, and generate a new international language pack.
[0188] In some embodiments of this application, the new international language pack is an incremental international language pack; the processing module 903 is specifically used to translate the updated text using a translation engine to obtain key-value pairs corresponding to multiple international language texts corresponding to the updated text; to perform correction processing on the key-value pairs to obtain corrected key-value pairs; and to generate a new international language pack in a preset format based on the corrected key-value pairs, wherein the preset format is a format that can be parsed by multiple types of terminal devices.
[0189] In some embodiments of this application, the new international language pack is a full international language pack; the processing module 903 is specifically used to translate the language update text using a translation engine to obtain key-value pairs corresponding to multiple international languages for the update text; to perform correction processing on the key-value pairs to obtain corrected key-value pairs; and to merge the corrected key-value pairs with the latest international language pack stored in the cloud device to generate a full international language pack in a preset format, wherein the preset format is a format that can be parsed by multiple user terminal platforms.
[0190] In some embodiments of this application, the sending module 902 is further configured to, when the updated text includes the target text, send the new international language pack to the terminal device running the target application through a preset interface after generating the new international language pack, so that the terminal device updates the language of the target application based on the new international language pack; the target text is the text obtained by modifying the erroneous language text in the latest international language pack currently stored.
[0191] The application international language pack update device provided in this application embodiment can execute the application international language pack update method for cloud devices in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0192] Figure 10 This is a schematic diagram of the structure of an international language pack update device for another application according to some embodiments. Figure 10 As shown, the device may include: a display module 1001, a receiving module 1002, and an updating module 1003, wherein:
[0193] The display module 1001 is used to display the target interface corresponding to the target instruction when a target instruction for the target application is received, and to send a language pack update request to the cloud device through a preset interface so that the cloud device can determine whether the language pack used by the terminal device needs to be updated based on the language pack update request; the target interface includes text from the target application's current local international language pack, and the target instruction is used to start the target application or to switch the language of the target application.
[0194] The receiving module 1002 is used to receive new international language packs sent by the cloud device through a preset interface. The new international language packs are sent to the terminal device by the cloud device when it determines that the language pack used by the terminal device needs to be updated.
[0195] Update module 1003 is used to update the local international language pack according to the new international language pack to obtain the target international language pack.
[0196] The display module 1001 is also used to refresh the target interface to update the text in the target interface from the local international language pack to the text from the target international language pack.
[0197] In some embodiments of this application, the new international language pack is an incremental international language pack, which includes updated text and multiple international language texts corresponding to the updated text; the update module 1003 is specifically used to parse the incremental international language pack through Flutter to obtain the parsed incremental international language pack, the format of the parsed incremental international language pack being the format corresponding to the user terminal platform to which the terminal device belongs; and to merge the parsed incremental international language pack with the local international language pack to obtain the target international language pack.
[0198] In some embodiments of this application, the new international language pack is a full international language pack, which includes updated text, multiple international language texts corresponding to the updated text, unupdated text, and multiple international language texts corresponding to the unupdated text; the update module 1003 is specifically used to parse the full international language pack through Flutter to obtain the target international language pack, and the format of the target international language pack is the format corresponding to the user terminal platform to which the terminal device belongs.
[0199] In some embodiments of this application, the receiving module 1002 is further configured to receive a new international language pack sent by a cloud device through a preset interface during the operation of the target application; the new international language pack is generated by the cloud device based on the updated text when the updated text includes the target text; the target text is the text obtained by modifying the erroneous language text in the latest international language pack stored by the cloud device.
[0200] Update module 1003 is also used to update the local international language pack according to the new international language pack to obtain the target international language pack.
[0201] The application international language pack update device provided in this application embodiment can execute the application international language pack update method for terminal devices in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0202] Figure 11 This is a schematic diagram of the structure of an electronic device according to some embodiments. For example... Figure 11 As shown, the electronic device 110 provided in this embodiment includes at least one processor 1101 and a memory 1102. Optionally, the device 110 further includes a communication component 1103. The processor 1101, the memory 1102, and the communication component 1103 are connected via a bus 1104.
[0203] In a specific implementation, at least one processor 1101 executes computer execution instructions stored in memory 1102, causing at least one processor 1101 to perform the above-described method.
[0204] The specific implementation process of processor 1101 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0205] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0206] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0207] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0208] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores computer-executable instructions, which are executed by a computer to implement the technical solutions shown in the above-described method embodiments.
[0209] This application also provides a program product, which includes executable instructions stored in a readable storage medium. When the computer program is executed by a computer, the technical solution shown in the above method embodiments is executed. The specific implementation method and technical effect are similar, and will not be described again here.
[0210] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0211] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of embodiments suitable for specific application considerations.
[0212] In this application, "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document indicates that the preceding and following related objects have an "or" relationship.
[0213] "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b, and c, where each of a, b, and c can be an element itself or a set containing one or more elements.
[0214] In this application, "at least one" means one or more. "More than one" means two or more. The descriptions of "first," "second," etc., appearing in the embodiments of this application are only for illustration and to distinguish the described objects, and have no order, nor do they indicate a special limitation on the number of devices in the embodiments of this application, and cannot constitute any limitation on the embodiments of this application. For example, "first threshold" and "second threshold" are only used to distinguish different thresholds, and do not indicate that the size, priority, or importance of these two thresholds are different.
[0215] In this application, terms such as "exemplary," "in some embodiments," and "in other embodiments" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the term "exemplary" is used to present the concept in a specific manner.
[0216] In this application, the terms "of," "corresponding (relevant)," "corresponding," and "related" may sometimes be used interchangeably. It should be noted that, unless a distinction is emphasized, their intended meanings are consistent. Similarly, in the embodiments of this application, "communication" and "transmission" may sometimes be used interchangeably. It should be noted that, unless a distinction is emphasized, their intended meanings are consistent. For example, transmission can include sending and / or receiving, and can be a noun or a verb.
[0217] In this application, "equal to" can be used with "less than" or "greater than", but not simultaneously with both. When "equal to" is used with "less than", it applies to the technical solution adopted by "less than". When "equal to" is used with "greater than", it applies to the technical solution adopted by "greater than".
Claims
1. A method for updating the international language pack of an application, characterized in that, Applied to cloud devices, the method includes: When a language pack update request is received from a terminal device via a preset interface, the system determines whether the language pack used by the terminal device needs to be updated based on the language pack update request and the new international language pack. The language pack update request is sent by the terminal device when it launches the target application or when it switches the language of the target application. The new international language pack is obtained by updating the language of the target application. When the language pack used by the terminal device needs to be updated, the new international language pack is sent to the terminal device through the preset interface, so that the terminal device updates the language of the target application based on the new international language pack.
2. The method according to claim 1, characterized in that, The step of determining whether the language pack used by the terminal device needs to be updated based on the language pack update request and the new international language pack includes: The first version number carried in the language pack update request is compared with the second version number of the new international language pack; the second version number is generated when the new international language pack is generated. When the first version number is different from the second version number, it is determined that the language pack used by the terminal device needs to be updated; When the first version number is the same as the second version number, it is determined that the language pack used by the terminal device does not need to be updated.
3. The method according to claim 1 or 2, characterized in that, The method further includes: Retrieve updated text for the target application's language; The updated text is translated and corrected to obtain multiple international language texts corresponding to the updated text, and a new international language pack is generated.
4. The method according to claim 3, characterized in that, The new international language pack is an incremental international language pack; The process of translating and correcting the updated text to obtain multiple international language texts corresponding to the updated text, and generating a new international language package, includes: The updated text is translated using a translation engine to obtain key-value pairs corresponding to multiple international language texts. The key-value pairs are corrected to obtain corrected key-value pairs; Based on the corrected key-value pairs, a new international language pack in a preset format is generated, wherein the preset format is a format that can be parsed by various types of terminal devices.
5. The method according to claim 3, characterized in that, The new international language pack is a full international language pack; The process of translating and correcting the updated text to obtain multiple international language texts corresponding to the updated text, and generating a new international language package, includes: The updated text in the language is translated using a translation engine to obtain key-value pairs in multiple international languages corresponding to the updated text; The key-value pairs are corrected to obtain corrected key-value pairs; The corrected key-value pairs are merged with the latest international language pack stored on the cloud device to generate a full international language pack in a preset format, which is a format that can be parsed by multiple user terminal platforms.
6. The method according to claim 1, characterized in that, The method further includes: When the updated text includes the target text, after generating the new international language pack, the new international language pack is sent to the terminal device running the target application through a preset interface, so that the terminal device updates the language of the target application based on the new international language pack; the target text is the text obtained by modifying the erroneous language text in the latest international language pack currently stored.
7. A method for updating the international language pack of an application, characterized in that, Applied to terminal devices, including: When a target instruction is received for a target application, the target interface corresponding to the target instruction is displayed, and a language pack update request is sent to the cloud device through a preset interface, so that the cloud device can determine whether the language pack used by the terminal device needs to be updated based on the language pack update request; the target interface includes text from the target application's current local international language pack, and the target instruction is used to launch the target application, or to switch the language of the target application; The terminal device receives a new international language pack sent by the cloud device through the preset interface. The new international language pack is sent to the terminal device by the cloud device when it determines that the language pack used by the terminal device needs to be updated. The local international language pack is updated according to the new international language pack to obtain the target international language pack; Refresh the target interface to update the text in the target interface from the local international language pack to the text from the target international language pack.
8. The method according to claim 7, characterized in that, The new international language pack is an incremental international language pack, which includes updated text and multiple international language texts corresponding to the updated text. The step of updating the local international language pack according to the new international language pack to obtain the target international language pack includes: The incremental international language pack is parsed using Flutter to obtain the parsed incremental international language pack, and the format of the parsed incremental international language pack is the format corresponding to the user terminal platform to which the terminal device belongs; The parsed incremental international language pack is merged with the local international language pack to obtain the target international language pack.
9. The method according to claim 7, characterized in that, The new international language pack is a full international language pack, which includes updated text, multiple international language texts corresponding to the updated text, unupdated text, and multiple international language texts corresponding to the unupdated text. The step of updating the local international language pack according to the new international language pack to obtain the target international language pack includes: The target international language pack is obtained by parsing the full international language pack using Flutter. The format of the target international language pack is the same as that of the user platform to which the terminal device belongs.
10. The method according to any one of claims 7-9, characterized in that, The method further includes: During the operation of the target application, a new international language pack sent by the cloud device is received through the preset interface; the new international language pack is generated by the cloud device based on the updated text when the updated text includes the target text; the target text is text obtained by modifying erroneous language text in the latest international language pack stored by the cloud device. The local international language pack is updated according to the new international language pack to obtain the target international language pack.
11. An electronic device, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the method as described in any one of claims 1-6 or 7-10.