CN110990105A - Interface display method and device, electronic equipment and storage medium - Google Patents

Interface display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110990105A
CN110990105A CN201911260257.XA CN201911260257A CN110990105A CN 110990105 A CN110990105 A CN 110990105A CN 201911260257 A CN201911260257 A CN 201911260257A CN 110990105 A CN110990105 A CN 110990105A
Authority
CN
China
Prior art keywords
language
interface
target
application program
target application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911260257.XA
Other languages
Chinese (zh)
Other versions
CN110990105B (en
Inventor
董永清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201911260257.XA priority Critical patent/CN110990105B/en
Publication of CN110990105A publication Critical patent/CN110990105A/en
Application granted granted Critical
Publication of CN110990105B publication Critical patent/CN110990105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation

Abstract

The disclosure provides an interface display method and device, electronic equipment and a storage medium, and belongs to the technical field of electronic equipment. The method comprises the following steps: acquiring an interface file of an interface to be displayed of a first target application program and acquiring a language environment where the first target application program is located, wherein the interface file comprises a language resource library; determining target language resources corresponding to the language environment from a language resource library according to the language environment; for each interface element in the interface file, determining a field corresponding to the interface element from the target language resource; and displaying the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element. The electronic equipment can display the interface of the first target application program through the target language resource and the interface file corresponding to the language environment. The first target application program can be applied to various different language environments without a large amount of development, and the efficiency of realizing the multi-language function is improved.

Description

Interface display method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to an interface display method and apparatus, an electronic device, and a storage medium.
Background
Electronic devices are applied to different countries and regions, and application programs on the electronic devices are usually distributed in different language versions facing different countries and regions in order to meet international requirements. The languages displayed in the interfaces of the application programs of different language versions are different. For example, chinese is displayed in the interface of an application published in china, and english is displayed in the interface of an application published in the united states. In order to enable the application program to be applied to different language environments, when the application program is developed, the application program with different language versions is developed according to the country and the region which need to be oriented.
Disclosure of Invention
The embodiment of the disclosure provides an interface display method and device, an electronic device and a storage medium, which can solve the problem that the development efficiency is low in order to meet the international requirements of multiple languages for an application program. The technical scheme is as follows:
according to an aspect of the embodiments of the present disclosure, there is provided an interface display method, including:
the method comprises the steps of obtaining an interface file of an interface to be displayed of a first target application program and obtaining a language environment where the first target application program is located, wherein the interface file comprises a language resource library;
according to the language environment, determining a target language resource corresponding to the language environment from the language resource library, wherein the language resource library comprises at least one language resource corresponding to the language environment;
for each interface element in the interface file, determining a field corresponding to the interface element from the target language resource;
and displaying the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
In a possible implementation manner, the determining, according to the language environment, a target language resource corresponding to the language environment from the language resource library includes:
determining a first language identifier corresponding to the language environment according to the language environment;
and according to the first language identification, determining a target language resource matched with the first language identification from the language resource library.
In another possible implementation manner, the determining, from the language resource library according to the first language identifier, a target language resource matching the first language identifier includes:
according to the first language identification, determining a target language identification corresponding to the first language identification from second language identifications corresponding to each language resource in the language resource library;
and determining the target language resource corresponding to the target language identification from the language resource library according to the target language identification.
In another possible implementation manner, the obtaining the language environment in which the first target application program is located includes:
acquiring language setting corresponding to a first target application program;
and determining the language environment of the first target application program according to the language setting.
In another possible implementation manner, the obtaining the language environment in which the first target application program is located includes:
acquiring position information corresponding to a first target application program;
and determining the language environment of the first target application program according to the position information.
In another possible implementation manner, the method further includes:
sending an acquisition request to a server, wherein the acquisition request is used for requesting to acquire an interface file of an interface to be displayed of the first target application program;
and receiving the interface file returned by the server.
According to another aspect of the embodiments of the present disclosure, there is provided an interface display apparatus including:
the system comprises an acquisition module and a display module, wherein the acquisition module is configured to acquire an interface file of an interface to be displayed of a first target application program and acquire a language environment in which the first target application program is located, and the interface file comprises a language resource library;
the determining module is configured to determine a target language resource corresponding to the language environment from the language resource library according to the language environment, wherein the language resource library comprises at least one language resource corresponding to the language environment;
the determining module is further configured to determine, for each interface element in the interface file, a field corresponding to the interface element from the target language resource;
and the display module is configured to display the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
In another possible implementation manner, the determining module is further configured to determine, according to the language environment, a first language identifier corresponding to the language environment; and according to the first language identification, determining a target language resource matched with the first language identification from the language resource library.
In another possible implementation manner, the determining module is further configured to determine, according to the first language identifier, a target language identifier corresponding to the first language identifier from second language identifiers corresponding to each language resource in the language resource library; and determining the target language resource corresponding to the target language identification from the language resource library according to the target language identification.
In another possible implementation manner, the obtaining module is further configured to obtain a language setting corresponding to the first target application program; and determining the language environment of the first target application program according to the language setting.
In another possible implementation manner, the obtaining module is further configured to obtain location information corresponding to the first target application; and determining the language environment of the first target application program according to the position information.
In another possible implementation manner, the apparatus further includes:
the sending module is configured to send an obtaining request to a server, wherein the obtaining request is used for requesting to obtain an interface file of an interface to be displayed of the first target application program;
the receiving module is configured to receive the interface file returned by the server.
According to another aspect of embodiments of the present disclosure, there is provided an electronic device comprising one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to:
the method comprises the steps of obtaining an interface file of an interface to be displayed of a first target application program and obtaining a language environment where the first target application program is located, wherein the interface file comprises a language resource library;
according to the language environment, determining a target language resource corresponding to the language environment from the language resource library, wherein the language resource library comprises at least one language resource corresponding to the language environment;
for each interface element in the interface file, determining a field corresponding to the interface element from the target language resource;
and displaying the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
According to another aspect of the embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium, wherein instructions of the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the interface display method according to any one of the above-mentioned possible implementation manners.
In the embodiment of the disclosure, the interface file of the electronic device includes a language resource library, the electronic device determines a target language resource corresponding to a language environment from the language resource library, determines a field corresponding to each interface element of the interface file from the target language resource, and displays the interface of the first target application program according to the interface element and the field corresponding to the interface element. The first target application program can be applied to various different language environments without being developed in a large quantity, and the language corresponding to the language environment is displayed on the interface, so that the efficiency of realizing the multi-language function is improved.
And the electronic equipment can determine the target language resources required to be displayed by the first target application program according to the corresponding relation between the language environment and the target language resources, so that the corresponding language can be displayed in the interface to be displayed according to the target language resources, the first target application program can adapt to the international requirement, and the application range of the first target application program is expanded.
And the electronic device can determine the language environment in which the first target application program is located according to the language setting of the first target application program. The user can switch the language environment where the first target application program is located according to the self requirement, and the flexibility is high.
And the electronic equipment can determine the language environment according to the position information. The user does not need to set or change the language setting, and the electronic equipment can automatically adapt to the language environment where the electronic equipment is located, so that the user operation can be simplified, and the user experience is improved.
In addition, the electronic equipment can acquire the interface file of the current latest interface to be displayed through the server, so that the electronic equipment can display the current latest interface to be displayed based on the interface file, and the interface display effect is better.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a schematic diagram of an implementation environment shown in accordance with an exemplary embodiment;
FIG. 2 is a flow chart illustrating a method of displaying an interface in accordance with an exemplary embodiment;
FIG. 3 is a flow chart illustrating a method of displaying an interface in accordance with an exemplary embodiment;
FIG. 4 is a block diagram illustrating a fast application framework in accordance with an exemplary embodiment;
FIG. 5 is a flowchart illustrating the launching of a fast application, according to an exemplary embodiment;
FIG. 6 is a block diagram illustrating an interface display apparatus according to an exemplary embodiment;
FIG. 7 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality" means two or more unless specifically limited otherwise.
Quick application: the application program is a novel application program and can run based on a native API (application programming Interface) provided by an operating system. The fast application is developed by adopting a unified standard, is rendered as native, and has the double advantages of an HTML5(Hyper Text Markup Language, 5 th generation) interface and native application. The framework of the fast application can be deeply integrated in an operating system, can operate at the level of the operating system, and realizes seamless connection with other application services. The developer can operate on different types of equipment by one-time development, and can use the equipment without downloading and installation by a user, namely, the equipment is used on point.
Due to the specificity of fast applications, fast applications are expected to perform more tasks and perform more functions. At present, in the process of gradually improving the functions of the fast application, the embodiment of the disclosure provides a new function of the fast application, and by using the new function, the fast application can adapt to the international requirements of multiple languages without a large amount of development. The functions of the fast application are expanded, and the processing capacity and the practicability of the fast application are improved.
FIG. 1 is a schematic diagram illustrating one implementation environment in accordance with an example embodiment. Referring to fig. 1, the implementation environment includes an electronic device 101 and a server 102; the electronic device 101 and the server 102 are connected via a wireless or wired network.
The electronic device 101 may be a computer, a mobile phone, a smart television, a wearable device, a tablet computer, or other electronic device. The server 102 may be a server, a server cluster formed by several servers, or a cloud computing center. Server 102 may be a background server for fast applications.
The second target application may be an application preset in an operating system of the electronic device 101, or may be an application provided by a third party. For example, the second target application may be an application such as an application download center or a fast application center. And the starting link identifier of the first target application program is displayed in the interface of the second target application program. The electronic device 101 may quickly enter the first target application program through the start link identifier corresponding to the first target application program. The first target application may be any application that is not installed on the electronic device 101. The first target application may be a fast application. For example, the first target application program may be a shopping block application, a music block application, a take-away block application, a video block application, a social block application, a browser block application, or the like, which provides an arbitrary service to the user.
The server 102 may provide a service for the first target application. When the electronic device 101 needs to display the interface of the first target application program, the interface file of the interface to be displayed may be acquired by the server 102, and the interface to be displayed of the first target application program is displayed based on the interface file.
FIG. 2 is a flow chart illustrating a method of displaying an interface in accordance with an exemplary embodiment. Referring to fig. 2, the interface display method includes the steps of:
in step S201, an interface file of an interface to be displayed of the first target application program is obtained, and a language environment in which the first target application program is located is obtained, where the interface file includes a language resource library.
In step S202, a target language resource corresponding to a language environment is determined from a language resource library according to the language environment, where the language resource library includes at least one language resource corresponding to the language environment.
In step S203, for each interface element in the interface file, determining a field corresponding to the interface element from the target language resource; and displaying the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
In the embodiment of the disclosure, the interface file of the electronic device includes a language resource library, the electronic device determines a target language resource corresponding to a language environment from the language resource library, determines a field corresponding to each interface element of the interface file from the target language resource, and displays the interface of the first target application program according to the interface element and the field corresponding to the interface element. The first target application program can be applied to various different language environments without being developed in a large quantity, and the language corresponding to the language environment is displayed on the interface, so that the efficiency of realizing the multi-language function is improved.
In a possible implementation manner, determining a target language resource corresponding to a language environment from a language resource library according to the language environment includes:
determining a first language identifier corresponding to the language environment according to the language environment;
and according to the first language identification, determining a target language resource matched with the first language identification from the language resource library.
In another possible implementation manner, determining, from the language resource library, a target language resource matching the first language identifier according to the first language identifier includes:
according to the first language identification, determining a target language identification corresponding to the first language identification from a second language identification corresponding to each language resource in a language resource library;
and determining the target language resource corresponding to the target language identification from the language resource library according to the target language identification.
In another possible implementation manner, the obtaining of the language environment in which the first target application program is located includes:
acquiring language setting corresponding to a first target application program;
and determining the language environment in which the first target application program is positioned according to the language setting.
In another possible implementation manner, the obtaining of the language environment in which the first target application program is located includes:
acquiring position information corresponding to a first target application program;
and determining the language environment in which the first target application program is positioned according to the position information.
In another possible implementation manner, the method further includes:
sending an acquisition request to a server, wherein the acquisition request is used for requesting to acquire an interface file of an interface to be displayed of a first target application program;
and receiving the interface file returned by the server.
FIG. 3 is a flow chart illustrating a method of displaying an interface in accordance with an exemplary embodiment. Referring to fig. 3, the interface display method includes the steps of:
in step S301, the electronic device obtains an interface file of an interface to be displayed of the first target application, where the interface file includes a language resource library.
The language resource library comprises language resources corresponding to a plurality of language environments. The language resource corresponding to each language environment comprises at least one field corresponding to the language environment, and the field corresponds to the content to be displayed on the interface to be displayed.
For example, the language resource library may be an i18n (international and localization) resource library, and the language resource library may include language resources corresponding to multiple language environments, such as chinese language resources, english language resources, russian language resources, and thai language resources.
The language resource corresponding to each language environment can be packaged as a json (javascript object notation), a lightweight data interchange format) file. Correspondingly, the language resource library comprises a plurality of json files. For example, the language environment is chinese, and the json file of the language resource corresponding to the language environment is ch.json; the language environment is english, and the json file of the language resource corresponding to the language environment is en.
The language resource corresponding to each language environment comprises at least one field corresponding to the language environment, and the field corresponding to the at least one language environment corresponds to the content of the interface of the first target application program. For example, the content of the interface of the first target application includes "hello", "message", and "send", among other contents. When the language environment is Chinese, the language resources corresponding to the language environment comprise fields of 'hello', 'message' and 'send'; when the language environment is english, the language resource corresponding to the language environment includes fields such as "hello", "message", and "send".
The interface file comprises interface layout information, interface control information and other information related to interface display, and the electronic equipment can display a corresponding interface based on the interface file. The interface file may be a js (javascript, a script language) format file. For example, the interface to be displayed of the first target application includes a first interface and a second interface, the interface file of the first interface may be page1.js, and the interface file of the second interface may be page2. js.
The interface to be displayed can be any interface of the first target application program. The interface to be displayed may be a main interface of the first target application program, and the interface to be displayed may also be any sub-interface of the first target application program. When the electronic equipment receives an instruction for starting the first target application program, the interface to be displayed is a main interface of the first target application program. When the electronic equipment receives an interface jump instruction, the interface to be displayed is the interface needing to be jumped to. For example, the first target application program is a social application, and when the electronic device receives an instruction for starting the first target application program, the interface to be displayed is a home page of the first target application program; when the electronic equipment receives an instruction of jumping to a chat page, the interface to be displayed is the chat page of the first target application program; when the electronic equipment receives an instruction of jumping to a setting page, the interface to be displayed is the setting page of the first target application program.
In a possible implementation manner, the first target application is a local uninstalled application, and the electronic device may obtain, through the server, an interface file of an interface to be displayed of the first target application. Correspondingly, the step of acquiring, by the electronic device, the interface file of the interface to be displayed of the first target application program may be: the electronic equipment sends an acquisition request to the server, wherein the acquisition request is used for requesting to acquire an interface file of an interface to be displayed of the first target application program; and receiving the interface file returned by the server.
The server returns an interface file corresponding to the interface to be displayed to the electronic device according to the identifier corresponding to the interface to be displayed.
The electronic equipment can acquire the interface file of the interface to be displayed through the frame layer of the server. For example, the framework layer of the server may be a java (an object-oriented programming language) framework layer.
In the embodiment of the disclosure, the electronic device may obtain the interface file of the current latest interface to be displayed through the server, so that the electronic device may display the current latest interface to be displayed based on the interface file, and the interface display effect is better.
In another possible implementation manner, the first target application is a local uninstalled application, the interface to be displayed is not displayed on the electronic device for the first time, the interface file of the interface to be displayed is stored in the cache region of the electronic device, and the electronic device may directly obtain the interface file of the interface to be displayed from the cache region. Correspondingly, the step of acquiring, by the electronic device, the interface file of the interface to be displayed of the first target application program may be: and the electronic equipment acquires the interface file corresponding to the identifier from the buffer area according to the identifier corresponding to the interface to be displayed.
In the embodiment of the disclosure, the electronic device can directly acquire the interface file of the interface to be displayed from the cache region, the acquisition speed of the interface file of the interface to be displayed is higher, and the interface display efficiency is higher.
Before the electronic device obtains the interface file of the interface to be displayed from the cache region, the interface file of the interface to be displayed needs to be stored in the cache region, and correspondingly, the step of storing the interface file of the interface to be displayed by the electronic device may be: when the electronic equipment receives an instruction of jumping to an interface to be displayed for the first time, the electronic equipment sends an acquisition request to a server, wherein the acquisition request is used for requesting to acquire an interface file of the interface to be displayed; and receiving the interface file returned by the server, and storing the identifier corresponding to the interface to be displayed and the interface file corresponding to the interface to be displayed in a cache region in an associated manner.
It should be noted that, when the first target application is a locally uninstalled application, the electronic device may start the first target application through a locally installed second target application. Correspondingly, the step of the electronic device starting the first target application program through the second target application program may be: the electronic equipment displays a target interface of a second target application program which is installed locally, wherein the target interface comprises a starting link identifier of a first target application program which is not installed locally; when the electronic equipment detects that a starting link identifier of a first target application program is triggered, sending an acquisition request to a server, wherein the acquisition request is used for requesting to acquire an interface file of a starting interface of the first target application program; the electronic equipment receives an interface file of a starting interface of the first target application program returned by the server; and displaying a starting interface of the first target application program based on the interface file. The launch interface is an interface displayed when the first target application is launched, for example, the launch interface may be a main interface of the first target application.
The second target application may be an application installed locally to the electronic device. For example, the second target application is an application download center, a fast application center, or a desktop application installed on the electronic device. The target interface may include a start link identifier of the first target application, where the start link identifier is used to trigger the electronic device to display a start interface of the first target application.
For example, the second target application is an application download center, the electronic device receives a search operation for the first target application, and displays a search result in the target interface, where the search result includes a start link identifier of the first target application, and the start link identifier may be a "second on" identifier. And when the electronic equipment receives the trigger operation of the starting link identifier, starting the first target application program and displaying a starting interface of the first target application program.
For another example, the second target application is a fast application center, and when the electronic device receives an operation of triggering the start of the second target application, a target interface of the second target application is displayed, where the target interface includes a start link identifier of the first target application, and the start link identifier may be a fast start icon corresponding to the first target application. And when the electronic equipment receives the trigger operation of the starting link identifier, starting the first target application program and displaying a starting interface of the first target application program.
For another example, the second target application program is a desktop application, the target interface of the second target application program includes a start link identifier of the first target application program, the start link identifier may be a quick start icon of the first target application program, and when the electronic device receives a trigger operation on the start link identifier, the first target application program is started, and the start interface of the first target application program is displayed.
In the embodiment of the disclosure, since the user does not need to download the installation package corresponding to the first target application program, and does not need to install the first target application program on the electronic device, the first target application program can be operated, the local storage space of the electronic device is saved, and the function of the first target application program can be used by directly triggering the start-up link identifier, so that the experience of the user can be improved.
In another possible implementation manner, the first target application is an application installed locally in the electronic device, and the electronic device may obtain an interface file of an interface to be displayed of the first target application from a local resource. The local resource may be a resource file obtained by analyzing the installation package of the first target application program.
In step S302, the electronic device acquires a language environment in which the first target application program is located.
The language environment in which the first target application program is located may be any one of the language environments existing in the world currently, such as a chinese language environment, an english language environment, a thai language environment, and a russian language environment.
In a possible implementation manner, the electronic device may determine a language environment in which the first target application program is located according to a language setting corresponding to the first target application program. Correspondingly, the steps can be as follows: the electronic equipment acquires language setting corresponding to a first target application program; and determining the language environment in which the first target application program is positioned according to the language setting.
The electronic device can determine the language environment of the first target application program by acquiring the language setting of the system of the first target application program. For example, if the language of the system in which the electronic device is located is set to english, the electronic device may determine that the language environment in which the first target application program is located is english.
The electronic device may obtain the language setting of the system in which the first target application program is located each time the first target application program is started. The electronic equipment can also acquire the language setting of the system where the first target application program is located only when the first target application program is started for the first time, determine the language environment where the first target application program is located according to the language setting, and record the language environment; and when the first target application program is not started for the first time, acquiring the recorded language environment, and taking the recorded language environment as the language environment of the first target application program.
When the language setting of the system in which the first target application program is located changes, the language environment in which the first target application program is located may change following the change of the language setting of the system in which the first target application program is located. For example, when the language setting of the system in which the first target application program is located is changed from chinese to english, the language environment in which the first target application program is located may also be changed from chinese to english.
When the language setting of the system in which the first target application program is located changes, the language environment in which the first target application program is located may not change along with the change of the language setting of the system in which the first target application program is located. For example, when the language setting of the system in which the first target application program is located is changed from Chinese to English, the language environment in which the first target application program is located is still maintained in Chinese.
Whether the language environment in which the first target application program is located changes following the change of the language setting of the system in which the first target application program is located can support the user setting. Accordingly, the step of supporting the user setting may be: the electronic equipment displays a language setting interface of a first target application program, wherein the language setting interface comprises a following system option; when the electronic equipment receives selection operation of a following system option, determining that the language environment of the first target application program changes along with the change of the language setting of the system where the first target application program is located; when the electronic equipment does not receive the selection operation of the following system option, the language environment in which the first target application program is located is determined not to change along with the change of the language setting of the system in which the first target application program is located.
In the embodiment of the disclosure, the electronic device can determine the language environment according to the language setting of the system where the first target application program is located, and the determined language environment has a higher degree of fitting with the language environment required by the user. Moreover, the electronic equipment can determine and record the language environment of the system where the electronic equipment is located only when the first target application program is started for the first time, and can directly acquire the recorded language environment when the first target application program is not started for the first time, so that the efficiency of acquiring the language environment is high. Moreover, the language environment of the first target application program can be changed along with the change of the language setting of the system, and the flexibility of the change of the language environment is higher. Moreover, the language environment in which the first target application program is located may not change along with the change of the language setting of the system in which the first target application program is located, and the stability of the language environment corresponding to the first target application program is higher.
The first target application program can also provide a function of language setting, and the electronic device can determine the language environment in which the electronic device is located by acquiring the language setting of the first target application program. Correspondingly, the step of acquiring, by the electronic device, the language environment in which the first target application program is located may be: the electronic equipment displays a language setting interface of a first target application program, wherein the language setting interface comprises a language setting control; when the electronic equipment receives a triggering operation for the language setting control, displaying a pull-down menu corresponding to the language setting control, wherein the pull-down menu comprises at least one selectable language environment; receiving a selection operation of one language environment in at least one selectable language environment; and determining the language environment corresponding to the selection operation as the language environment in which the first target application program is positioned.
In the embodiment of the disclosure, the electronic device may determine the language environment in which the first target application program is located according to the language setting of the first target application program. The user can switch the language environment where the first target application program is located according to the self requirement, and the flexibility is high.
In another possible implementation manner, the electronic device may determine the language environment in which the first target application program is located according to the location information. Correspondingly, the step of acquiring, by the electronic device, the language environment in which the first target application program is located may be: the electronic equipment acquires position information corresponding to a first target application program; and determining the language environment in which the first target application program is positioned according to the position information.
The electronic device can determine the language environment in which the first target application program is located directly according to the position information. For example, the location information acquired by the electronic device is chinese, and the language environment in which the first target application program is located can be determined to be a chinese language environment; the location information acquired by the electronic device is the united states, and the language environment in which the first target application program is located can be determined to be the language environment in english.
The electronic device may further determine the language environment according to the country or region corresponding to the obtained location information, and correspondingly, the step of determining, by the electronic device, the language environment in which the first target application program is located according to the location information may be: the electronic equipment determines a country or a region matched with the position information according to the position information, and determines a language environment corresponding to the country or the region as a language environment in which the first target application program is located.
For example, the location information acquired by the electronic device may be a place name, and when the location information acquired by the electronic device is beijing, the country matching the location information may be determined to be china, and the language environment in which the location information is located may be determined to be a language environment of chinese. For another example, the location information acquired by the electronic device may also be latitude and longitude, and when the electronically acquired location information is 39.9 north latitude and 116.3 east longitude, the country matched with the location information may be determined to be china, and the language environment in which the location information is located may be determined to be a chinese language environment.
The electronic device may store a corresponding relationship between the location information and the language environment, and the electronic device may determine the language environment in which the first target application program is located according to the location information and the corresponding relationship between the location information and the language environment.
The electronic device can also send the position information to the server and receive the language environment returned by the server. Correspondingly, the step of determining, by the electronic device, the language environment in which the first target application program is located according to the location information may be: the electronic equipment sends a language environment acquisition request to the server, wherein the language environment acquisition request carries the position information of the first target application program; and receiving the language environment returned by the server, wherein the server is used for determining the language environment where the first target application program is located according to the position information and returning the language environment to the electronic equipment.
In the embodiment of the disclosure, the electronic device may determine the language environment according to the location information. The user does not need to set or change the language setting, and the electronic equipment can automatically adapt to the language environment where the electronic equipment is located, so that the user operation can be simplified, and the user experience is improved.
It should be noted that step S301 and step S302 do not have a strict chronological order; step S301 may be executed first, and then step S302 may be executed; step S302 may be performed first, and then step S301 may be performed; step S301 and step S302 may also be performed simultaneously; in the embodiment of the present disclosure, the execution sequence of step S301 and step S302 is not limited.
In step S303, the electronic device determines a target language resource corresponding to the language environment from the language resource library according to the language environment.
In one possible implementation manner, the electronic device stores a corresponding relationship between the language environment and the language resource. Each language environment corresponds to a language resource in the language resource library. The electronic device can determine the target language resource corresponding to the language environment from the language resource library according to the language environment and the corresponding relationship between the language environment and the language resource.
In another possible implementation manner, the language environment corresponds to a first language identifier, and the electronic device may determine the target language resource according to the first language identifier. Correspondingly, the step of determining, by the electronic device, the target language resource corresponding to the language environment from the language resource library according to the language environment may be: the electronic equipment determines a first language identifier corresponding to the language environment according to the language environment; and the electronic equipment determines a target language resource matched with the first language identifier from the language resource library according to the first language identifier.
The electronic device may store a corresponding relationship between the language environment and the first language identifier, for example, the first language identifier corresponding to the language environment in chinese is "ch", and the first language identifier corresponding to the language environment in english is "en".
The electronic device can determine a target language resource corresponding to the language environment from the language resource library according to the first language identifier. For example, json files such as ch.json and en.json are included in the language resource library. When the language environment is Chinese, the first language identifier is 'ch', and the target language resource matched with the first language identifier is ch.json; when the language environment is english, the first language identifier is "en", and the target language resource matched with the first language identifier is en.
In another possible implementation manner, each language resource in the language resource library corresponds to a second language identifier, and the electronic device may determine the target language resource according to a corresponding relationship between the first language identifier and the second language identifier. Correspondingly, the step of determining, by the electronic device, the target language resource corresponding to the language environment from the language resource library according to the first language identifier may be: the electronic equipment determines a target language identifier corresponding to the first language identifier from a second language identifier corresponding to each language resource in the language resource library according to the first language identifier; and the electronic equipment determines the target language resource corresponding to the target language identifier from the language resource library according to the target language identifier.
The electronic device may store a correspondence between the second language identifier and the language resources in the language resource library, where each language resource in the language resource library corresponds to a second language identifier. For example, the language resource library includes language resources such as a Chinese language resource corresponding to the second language identifier "Chinese", and an english language resource corresponding to the second language identifier "english".
The electronic device may store a correspondence relationship between the first language identifier and the target language identifier, for example, when the first language identifier is "ch", the target language identifier corresponding to the first language identifier is "Chinese". For another example, when the first language identifier is "en", the target language identifier corresponding to the first language identifier is "Englishi".
The electronic equipment can determine a target language identifier from a second language identifier corresponding to each language resource in the language resource library according to the first language identifier corresponding to the language environment, and determine the target language resource according to the target language identifier. For example, when the language environment in which the first target application program is located is an english language environment, the first language identifier corresponding to the language environment is "en", and the electronic device may determine, according to the correspondence between the first language identifier and the second language identifier, that the target language identifier corresponding to the first language identifier is "Englishi", and further determine that the target language resource corresponding to the target language identifier is an english language resource.
In the embodiment of the disclosure, the electronic device can determine the target language resource required to be displayed by the first target application program according to the corresponding relationship between the language environment and the target language resource, so that the corresponding language can be displayed in the interface to be displayed according to the target language resource, the first target application program can adapt to the international requirement, and the application range of the first target application program is expanded.
In step S304, for each interface element in the interface file, the electronic device determines a field corresponding to the interface element from the target language resource; and displaying the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
The target language resource includes a field corresponding to each interface element in each interface of the first target application. For example, the first target application includes a first interface and a second interface. The first interface includes a first interface element, which may be denoted by "p 1.k 1", and a second interface element, which may be denoted by "p 1.k 2". The second interface includes a third interface element, which may be denoted by "p 2.k 1", a fourth interface element, which may be denoted by "p 2.k 2", and a fifth interface element, which may be denoted by "p 2.k 3". When the target language resource is a language resource of chinese, the target language resource includes p1.k1 ═ hello, "p 1.k2 ═ next page," p2.k1 ═ message, "p 2.k2 ═ send," and p2.k3 ═ close.
The interface file comprises at least one interface element, and the interface element comprises interface elements of types such as a content type and a control type. The interface elements correspond to interface layout information such as the size of the interface elements and the display positions of the interface elements in the interface to be displayed.
The electronic device determines a field corresponding to the interface element from the target language resource, assigns the field corresponding to the interface element, and displays the assigned interface element in the interface to be displayed of the first target application program, and the step of displaying the interface to be displayed of the first target application program by the electronic device according to the interface element and the field corresponding to the interface element may be: the electronic equipment assigns the fields corresponding to the interface elements; and displaying the assigned interface elements in the interface to be displayed of the first target application program according to the interface layout information corresponding to the interface elements.
The interface element is also corresponding to an operation interface, for example, the interface element is a sending control, a message to be sent exists in an input box corresponding to the sending control, and when the electronic device receives a click operation on the sending control, the operation interface corresponding to the sending control is called, and the message to be sent in the input box corresponding to the sending control is sent to the server.
In the embodiment of the disclosure, the electronic device can determine the field corresponding to each interface element of the interface file from the target language resource, assign the field to the corresponding interface element, and display the field on the interface to be displayed. The electronic equipment can display the language corresponding to the language environment on the interface, the display of the interface can be adapted to different language environments, and the applicable range of the first target application program is expanded.
In the embodiment of the disclosure, the interface file of the electronic device includes a language resource library, the electronic device determines a target language resource corresponding to a language environment from the language resource library, determines a field corresponding to each interface element of the interface file from the target language resource, and displays the interface of the first target application program according to the interface element and the field corresponding to the interface element. The first target application program can be applied to various different language environments without being developed in a large quantity, and the language corresponding to the language environment is displayed on the interface, so that the efficiency of realizing the multi-language function is improved.
All the above optional technical solutions may be combined arbitrarily to form the optional embodiments of the present disclosure, and are not described herein again.
The fast Application related in the embodiments of the present disclosure is a novel Application form based on a hardware platform of an electronic device, and can run based on a native API (Application Programming Interface) provided by an operating system.
The fast application is developed by adopting a unified standard, and is rendered as native without installation, namely, the fast application is used as point, and has native application experience (performance, system integration, interaction and the like). The framework of the fast application can be deeply integrated in an operating system, can operate at the level of the operating system, and realizes seamless connection with other application services. Developers can operate on different types of electronic equipment through one-time development. The method is applied to the electronic equipment manufacturers at the beginning of birth, realizes standardization unification among the electronic equipment manufacturers on the aspects of development specifications, capability access, developer service and the like, and greatly reduces the adaptation cost of developers.
Compared with the traditional application, the quick application has the following characteristics:
instant: the user can use the method point by point, and the user does not need to wait;
everywhere (Everywhere visible): deeply integrated with the use scene of the electronic equipment, and everywhere has an entrance, such as a search engine, an intelligent assistant, intelligent recommendation, an application market, a browser and the like;
efficiency: the quasi-front-end development mode is high in efficiency.
FIG. 4 is a block diagram illustrating a fast application framework 400 according to an example embodiment, the fast application framework including: scenario portal 420, fast application engine 440, and Operating System (OS) infrastructure and hardware 460.
The scene portal 420 includes at least one of a negative one-screen, a global search, a lock screen, a desktop, an application marketplace, a browser, and a two-dimensional code. The appearance of the scene portal 420 may be in the form of a page and a card.
The fast application engine 440 includes a front end framework 441, a generic scenario 442, a lightweight scenario 443, an embedded SDK (Software Development Kit) 444, and business access 445.
The front-end framework 441 includes an MVVM (Model-View-Model ), a V-DOM (Virtual-Document Object Model), a route, an Application Programming Interface (API), a service API, a User Interface (UI) component, a route, and the like;
the general scene 442 and the lightweight scene 443 include a JavaScript (a programming language) engine, a standard rendering engine, an extreme speed rendering engine, end-cloud-core acceleration, a security mechanism, emerging scenes such as AI (Artificial Intelligence), AR (Augmented Reality), and the like, system integration (application management, rights management, and the like);
service access 445 includes push, account/payment, etc.
OS infrastructure and hardware 460 includes: a graphics library, a native control, a system service, and a GPU (graphics Processing Unit)/NPU (embedded Neural network processor), etc.
From the execution path level, there are a standard HTML (Hyper Text Markup Language) 5 mode to support a general Web scene, and a JS (JavaScript, a programming Language) and Native (Native) mode to support a lighter and faster experience.
The architecture of the fast application engine will be briefly described in 3 aspects below.
1) Application development:
the design of the front end of the fast application refers to and integrates the design thought of the mainstream front end framework: the application is built in a componentized mode, an MVVM design mode taking data binding as a core is adopted, the performance is improved in a V-DOM mode, and meanwhile, a simple and clear template of a class Vue (a virtual machine shelling engine) is selected. Meanwhile, the layout aspect is correspondingly simplified. From the perspective of new application form, native UI mapping and capability opening, a set of components and API specifications need to be defined, and the rapid development application is convenient to develop.
2) System integration:
fast applications, as a complete application modality, can be deeply integrated with the system, run as native applications, and interact with the system. There are currently two forms of rapid application: a full screen mode independent application mode and an embedded mode card mode. Under the independent application form, the experience of the user is similar to a native application program, and the method has complete life cycle management, page management, routing and the like. The fast application can be hosted in the Activity of android, the page is hosted in Fragment, and the instance is managed and controlled through independent background Service. The card form is another form, and dynamic content is displayed in a light weight manner by embedding the embedded SDK (Software Development Kit) as an independent local control into each corner of the system. In the aspect of security isolation, better security guarantee can be achieved through a sandbox mechanism, process isolation and authority control in combination with the support of an operating system layer.
3) Performance experience and emerging scenes, such as JavaScript engines, rendering engines, end-cloud-core acceleration, emerging scenes, and the like:
in the aspects of interactive experience, resource overhead, stability and the like, the fast application realizes effective combination of a front-end development mode, native rendering and platform capability by introducing a native rendering path.
Different from cross-platform frameworks of other application layers, the application is planted in an operating system of the electronic equipment, and deep integration of a slave chip, the operating system and the cloud can be realized. By taking the acceleration of the starting performance as an example by combining the end and the cloud, the optimization of the network link layer can greatly accelerate the starting speed of the application through the cooperative rendering of the cloud and the end. Meanwhile, the special capability of the hardware platform can be integrated, and the experience is further improved. For example, the computing power of an NPU (Neural-network processing Unit, network processor) may be integrated into a fast application engine in combination with an AI chip of an electronic device, so that an AI scene (face recognition, image super-resolution, and the like) may be executed at a low latency and high performance on an end side, and meanwhile, the privacy of a user is effectively protected, and a bandwidth is saved.
FIG. 5 is a flowchart illustrating the launching of a fast application, according to an example embodiment, including:
1) when the system is started for the first time, a user clicks a program package for triggering downloading of the fast application, and meanwhile, initialization related work of the fast application engine is carried out. After the whole fast application program package is downloaded and verified, the JavaScript file of the first page to be displayed is loaded and rendered.
2) The page rendering comprises JavaScript loading, execution of page and JavaScript frame logic, layout operation and drawing of the native UI control. When the logic in the page is executed, one or more network requests are generated, and the data returned by the network requests drive the page to be rendered again until the content of the page on the first screen is completely displayed.
The network request, JavaScript execution, typesetting and drawing are not in simple serial relation, but are parallelly interwoven, thereby affecting the rendering performance of the whole page and being strongly related to the logic and network conditions of page design and the running state of equipment.
Due to the specificity of fast applications, fast applications are expected to perform more tasks and perform more functions. At present, in the process of gradually improving the functions of the fast application, the embodiment of the disclosure provides a new function of the fast application, and by using the new function, the fast application can adapt to the international requirements of multiple languages without a large amount of development. The functions of the fast application are expanded, and the processing capacity and the practicability of the fast application are improved.
Fig. 6 is a block diagram illustrating an interface display apparatus according to an exemplary embodiment. Referring to fig. 6, the apparatus includes:
the obtaining module 601 is configured to obtain an interface file of an interface to be displayed of a first target application program, and obtain a language environment in which the first target application program is located, where the interface file includes a language resource library;
a determining module 602, configured to determine, according to a language environment, a target language resource corresponding to the language environment from a language resource library, where the language resource library includes at least one language resource corresponding to the language environment;
the determining module 602 is further configured to, for each interface element in the interface file, determine a field corresponding to the interface element from the target language resource;
the display module 603 is configured to display the interface to be displayed of the first target application according to the interface element and the field corresponding to the interface element.
In another possible implementation manner, the determining module 602 is further configured to determine, according to the language environment, a first language identifier corresponding to the language environment; and according to the first language identification, determining a target language resource matched with the first language identification from the language resource library.
In another possible implementation manner, the determining module 602 is further configured to determine, according to the first language identifier, a target language identifier corresponding to the first language identifier from the second language identifiers corresponding to each language resource in the language resource library; and determining the target language resource corresponding to the target language identification from the language resource library according to the target language identification.
In another possible implementation manner, the obtaining module 601 is further configured to obtain a language setting corresponding to the first target application; and determining the language environment in which the first target application program is positioned according to the language setting.
In another possible implementation manner, the obtaining module 601 is further configured to obtain location information corresponding to the first target application; and determining the language environment in which the first target application program is positioned according to the position information.
In another possible implementation manner, the apparatus further includes:
the sending module is configured to send an obtaining request to the server, wherein the obtaining request is used for requesting to obtain an interface file of an interface to be displayed of the first target application program;
and the receiving module is configured to receive the interface file returned by the server.
In the embodiment of the disclosure, the interface file of the electronic device includes a language resource library, the electronic device determines a target language resource corresponding to a language environment from the language resource library, determines a field corresponding to each interface element of the interface file from the target language resource, and displays the interface of the first target application program according to the interface element and the field corresponding to the interface element. The first target application program can be applied to various different language environments without being developed in a large quantity, and the language corresponding to the language environment is displayed on the interface, so that the efficiency of realizing the multi-language function is improved.
It should be noted that: in the interface display device provided in the above embodiment, when displaying an interface, only the division of the above functional modules is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the above described functions. In addition, the interface display device and the interface display method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are detailed in the method embodiments and are not described herein again.
Fig. 7 is a block diagram illustrating an electronic device 700 in accordance with an example embodiment. For example, the electronic device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 7, electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power component 706, a multimedia component 708, an audio component 710, an input/output (I/O) interface 712, a sensor component 714, and a communication component 716.
The processing component 702 generally controls overall operation of the electronic device 700, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to perform all or a portion of the steps of the interface display method described above. Further, the processing component 702 may include one or more modules that facilitate interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate interaction between the multimedia component 708 and the processing component 702.
The memory 704 is configured to store various types of data to support operations at the electronic device 700. Examples of such data include instructions for any application or method operating on the electronic device 700, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 704 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 706 provides power to the various components of the electronic device 700. The power components 706 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 700.
The multimedia component 708 includes a screen that provides an output interface between the electronic device 700 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 700 is in an operation mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 710 is configured to output and/or input audio signals. For example, the audio component 710 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 700 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 704 or transmitted via the communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.
The I/O interface 712 provides an interface between the processing component 702 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the electronic device 700. For example, the sensor assembly 714 may detect an open/closed state of the electronic device 700, the relative positioning of components, such as a display and keypad of the electronic device 700, the sensor assembly 714 may also detect a change in the position of the electronic device 700 or a component of the electronic device 700, the presence or absence of user contact with the electronic device 700, orientation or acceleration/deceleration of the electronic device 700, and a change in the temperature of the electronic device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 716 is configured to facilitate wired or wireless communication between the electronic device 700 and other devices. The electronic device 700 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 further includes a Near Field Communication (NFC) module to facilitate short-range communications.
In an exemplary embodiment, the electronic device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described interface display method.
In an exemplary embodiment, a non-transitory computer readable storage medium comprising instructions, such as the memory 704 comprising instructions, executable by the processor 720 of the electronic device 700 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM (Read-Only Memory), a RAM (Random Access Memory), a CD-ROM (Compact Disc Read-Only Memory), a magnetic tape, a floppy disk, an optical data storage device, and the like.
The present disclosure also provides a computer program product, which includes one or more computer programs, and when the computer program is executed by a processor, the computer program is used for implementing the interface display method provided by the above method embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is intended to be exemplary only and not to limit the present disclosure, and any modification, equivalent replacement, or improvement made without departing from the spirit and scope of the present disclosure is to be considered as the same as the present disclosure.

Claims (14)

1. An interface display method, characterized in that the method comprises:
the method comprises the steps of obtaining an interface file of an interface to be displayed of a first target application program and obtaining a language environment where the first target application program is located, wherein the interface file comprises a language resource library;
according to the language environment, determining a target language resource corresponding to the language environment from the language resource library, wherein the language resource library comprises at least one language resource corresponding to the language environment;
for each interface element in the interface file, determining a field corresponding to the interface element from the target language resource;
and displaying the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
2. The method according to claim 1, wherein the determining, according to the linguistic environment, a target linguistic resource corresponding to the linguistic environment from the linguistic resource library includes:
determining a first language identifier corresponding to the language environment according to the language environment;
and according to the first language identification, determining a target language resource matched with the first language identification from the language resource library.
3. The method of claim 2, wherein determining, from the language resource library, a target language resource matching the first language identifier according to the first language identifier comprises:
according to the first language identification, determining a target language identification corresponding to the first language identification from second language identifications corresponding to each language resource in the language resource library;
and determining the target language resource corresponding to the target language identification from the language resource library according to the target language identification.
4. The method of claim 1, wherein the obtaining the language environment in which the first target application is located comprises:
acquiring language setting corresponding to a first target application program;
and determining the language environment of the first target application program according to the language setting.
5. The method of claim 1, wherein the obtaining the language environment in which the first target application is located comprises:
acquiring position information corresponding to a first target application program;
and determining the language environment of the first target application program according to the position information.
6. The method of claim 1, further comprising:
sending an acquisition request to a server, wherein the acquisition request is used for requesting to acquire an interface file of an interface to be displayed of the first target application program;
and receiving the interface file returned by the server.
7. An interface display apparatus, the apparatus comprising:
the system comprises an acquisition module and a display module, wherein the acquisition module is configured to acquire an interface file of an interface to be displayed of a first target application program and acquire a language environment in which the first target application program is located, and the interface file comprises a language resource library;
the determining module is configured to determine a target language resource corresponding to the language environment from the language resource library according to the language environment, wherein the language resource library comprises at least one language resource corresponding to the language environment;
the determining module is further configured to determine, for each interface element in the interface file, a field corresponding to the interface element from the target language resource;
and the display module is configured to display the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
8. The apparatus of claim 7, wherein the determining module is further configured to determine a first language identifier corresponding to the language environment according to the language environment; and according to the first language identification, determining a target language resource matched with the first language identification from the language resource library.
9. The apparatus according to claim 8, wherein the determining module is further configured to determine, according to the first language identifier, a target language identifier corresponding to the first language identifier from a second language identifier corresponding to each language resource in the language resource library; and determining the target language resource corresponding to the target language identification from the language resource library according to the target language identification.
10. The apparatus of claim 7, wherein the obtaining module is further configured to obtain a language setting corresponding to the first target application; and determining the language environment of the first target application program according to the language setting.
11. The apparatus of claim 7, wherein the obtaining module is further configured to obtain location information corresponding to the first target application; and determining the language environment of the first target application program according to the position information.
12. The apparatus of claim 7, further comprising:
the sending module is configured to send an obtaining request to a server, wherein the obtaining request is used for requesting to obtain an interface file of an interface to be displayed of the first target application program;
the receiving module is configured to receive the interface file returned by the server.
13. An electronic device, wherein the electronic device comprises one or more processors;
volatile or non-volatile memory for storing the one or more processor-executable instructions;
wherein the one or more processors are configured to:
the method comprises the steps of obtaining an interface file of an interface to be displayed of a first target application program and obtaining a language environment where the first target application program is located, wherein the interface file comprises a language resource library;
according to the language environment, determining a target language resource corresponding to the language environment from the language resource library, wherein the language resource library comprises at least one language resource corresponding to the language environment;
for each interface element in the interface file, determining a field corresponding to the interface element from the target language resource;
and displaying the interface to be displayed of the first target application program according to the interface element and the field corresponding to the interface element.
14. A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the interface display method of any one of claims 1-6.
CN201911260257.XA 2019-12-10 2019-12-10 Interface display method and device, electronic equipment and storage medium Active CN110990105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911260257.XA CN110990105B (en) 2019-12-10 2019-12-10 Interface display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911260257.XA CN110990105B (en) 2019-12-10 2019-12-10 Interface display method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110990105A true CN110990105A (en) 2020-04-10
CN110990105B CN110990105B (en) 2024-04-23

Family

ID=70092047

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911260257.XA Active CN110990105B (en) 2019-12-10 2019-12-10 Interface display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110990105B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112165654A (en) * 2020-08-05 2021-01-01 深圳市华曦达科技股份有限公司 Channel language switching method and device, computer equipment and storage medium
CN112486623A (en) * 2020-12-16 2021-03-12 恩亿科(北京)数据科技有限公司 Development method, system and electronic equipment for automatically supporting multiple languages based on interface
CN112817655A (en) * 2021-01-29 2021-05-18 北京达佳互联信息技术有限公司 Document information processing method, device, storage medium and electronic equipment
CN112835633A (en) * 2020-12-17 2021-05-25 海信视像科技股份有限公司 Display device and control method of display language
CN114518920A (en) * 2020-11-20 2022-05-20 浙江宇视科技有限公司 Web language display method, device, medium and electronic equipment based on APP hybrid development
CN114579235A (en) * 2022-02-24 2022-06-03 百果园技术(新加坡)有限公司 Icon display method, device and equipment based on language type and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070244691A1 (en) * 2006-04-17 2007-10-18 Microsoft Corporation Translation of user interface text strings
CN101216820A (en) * 2008-01-17 2008-07-09 北京中星微电子有限公司 Multi-language translation method and device
CN102375733A (en) * 2010-08-24 2012-03-14 北大方正集团有限公司 Convenient and quick interface arrangement method
CN104020991A (en) * 2014-05-16 2014-09-03 可牛网络技术(北京)有限公司 Method and device for multi-language switching of application program
CN104516781A (en) * 2014-12-26 2015-04-15 北京元心科技有限公司 Operating system language switching method and device
CN105404508A (en) * 2015-11-05 2016-03-16 浪潮(北京)电子信息产业有限公司 Management interface multi-language supporting method and apparatus and terminal
CN107357568A (en) * 2017-06-12 2017-11-17 北京天健通泰科技有限公司 A kind of original language replacement method based on multi-lingual label
CN109358933A (en) * 2018-09-28 2019-02-19 北京小米移动软件有限公司 The creation method and device applied fastly
CN109634684A (en) * 2018-12-07 2019-04-16 万兴科技股份有限公司 Method, apparatus, computer equipment and the storage medium of application program load language

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070244691A1 (en) * 2006-04-17 2007-10-18 Microsoft Corporation Translation of user interface text strings
CN101216820A (en) * 2008-01-17 2008-07-09 北京中星微电子有限公司 Multi-language translation method and device
CN102375733A (en) * 2010-08-24 2012-03-14 北大方正集团有限公司 Convenient and quick interface arrangement method
CN104020991A (en) * 2014-05-16 2014-09-03 可牛网络技术(北京)有限公司 Method and device for multi-language switching of application program
CN104516781A (en) * 2014-12-26 2015-04-15 北京元心科技有限公司 Operating system language switching method and device
CN105404508A (en) * 2015-11-05 2016-03-16 浪潮(北京)电子信息产业有限公司 Management interface multi-language supporting method and apparatus and terminal
CN107357568A (en) * 2017-06-12 2017-11-17 北京天健通泰科技有限公司 A kind of original language replacement method based on multi-lingual label
CN109358933A (en) * 2018-09-28 2019-02-19 北京小米移动软件有限公司 The creation method and device applied fastly
CN109634684A (en) * 2018-12-07 2019-04-16 万兴科技股份有限公司 Method, apparatus, computer equipment and the storage medium of application program load language

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112165654A (en) * 2020-08-05 2021-01-01 深圳市华曦达科技股份有限公司 Channel language switching method and device, computer equipment and storage medium
CN114518920A (en) * 2020-11-20 2022-05-20 浙江宇视科技有限公司 Web language display method, device, medium and electronic equipment based on APP hybrid development
CN112486623A (en) * 2020-12-16 2021-03-12 恩亿科(北京)数据科技有限公司 Development method, system and electronic equipment for automatically supporting multiple languages based on interface
CN112835633A (en) * 2020-12-17 2021-05-25 海信视像科技股份有限公司 Display device and control method of display language
CN112835633B (en) * 2020-12-17 2022-11-11 海信视像科技股份有限公司 Display device and control method of display language
CN112817655A (en) * 2021-01-29 2021-05-18 北京达佳互联信息技术有限公司 Document information processing method, device, storage medium and electronic equipment
CN114579235A (en) * 2022-02-24 2022-06-03 百果园技术(新加坡)有限公司 Icon display method, device and equipment based on language type and storage medium
CN114579235B (en) * 2022-02-24 2024-04-09 百果园技术(新加坡)有限公司 Language type-based icon display method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110990105B (en) 2024-04-23

Similar Documents

Publication Publication Date Title
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
CN110990105B (en) Interface display method and device, electronic equipment and storage medium
CN107329743B (en) Application page display method and device and storage medium
CN111026490B (en) Page rendering method and device, electronic equipment and storage medium
CN110990075B (en) Method, device, equipment and storage medium for starting fast application
CN110874217B (en) Interface display method and device for quick application and storage medium
US10817282B2 (en) Application configuration file generation method and apparatus, application page display method and apparatus and storage medium
CN110851108A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN111078325B (en) Application program running method and device, electronic equipment and storage medium
CN110865863B (en) Interface display method and device for fast application and storage medium
CN111008057A (en) Page display method and device and storage medium
CN110851240B (en) Function calling method, device and storage medium
CN110971974B (en) Configuration parameter creating method, device, terminal and storage medium
US11507633B2 (en) Card data display method and apparatus, and storage medium
CN110865864B (en) Interface display method, device and equipment for quick application and storage medium
US11210119B2 (en) Method and device for displaying interface, electronic equipment, server, and storage medium
CN111104183B (en) Application program running method and device, electronic equipment and storage medium
CN111008050B (en) Page task execution method, device, terminal and storage medium
CN110865760A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN110908629A (en) Electronic equipment operation method and device, electronic equipment and storage medium
CN111338961B (en) Application debugging method and device, electronic equipment and storage medium
CN110891194B (en) Comment information display method and device, terminal and storage medium
CN111221613B (en) Program calling method and device and storage medium
CN111026491B (en) Interface display method, device, electronic equipment, server and storage medium
CN110853643A (en) Method, device, equipment and storage medium for voice recognition in fast application

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant