CN111124406A - Static page language switching method and device, storage medium and electronic equipment - Google Patents

Static page language switching method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111124406A
CN111124406A CN201911260129.5A CN201911260129A CN111124406A CN 111124406 A CN111124406 A CN 111124406A CN 201911260129 A CN201911260129 A CN 201911260129A CN 111124406 A CN111124406 A CN 111124406A
Authority
CN
China
Prior art keywords
display
page
static page
static
language
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.)
Pending
Application number
CN201911260129.5A
Other languages
Chinese (zh)
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.)
Dongsoft Group Dalian Co ltd
Neusoft Corp
Original Assignee
Dongsoft Group Dalian Co ltd
Neusoft Corp
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 Dongsoft Group Dalian Co ltd, Neusoft Corp filed Critical Dongsoft Group Dalian Co ltd
Priority to CN201911260129.5A priority Critical patent/CN111124406A/en
Publication of CN111124406A publication Critical patent/CN111124406A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a static page language switching method, a device, a storage medium and an electronic device, wherein the method comprises the following steps: when the language of a static page is switched, determining a target display language to which the static page is switched; determining a target display page corresponding to the target display language from a page set corresponding to the static page, wherein the page set comprises display pages corresponding to the static page respectively in a plurality of display languages, and the display pages are generated based on a configuration file of the static page; displaying the target display page, wherein the content of the target display page is displayed through the target display language. Therefore, when the target display page is determined, the target display page can be directly displayed, so that the dynamic rendering of a static page based on a json file in the prior art is avoided, and the page response speed is improved. Moreover, multiple pages in the page set can be maintained conveniently, and language switching is facilitated.

Description

Static page language switching method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a static page language switching method and apparatus, a storage medium, and an electronic device.
Background
With the rise of internet technology and the increase of users, multi-language scene requirements are frequently met in service development, and support of multiple display languages is required to be provided. In the prior art, for multi-language support of a static page, a multi-language scheme provided by a front-end framework is usually adopted, for example, a single page is developed, a json file is used for multi-language configuration and support, when a user actually accesses the page, the page is dynamically rendered and displayed according to language switching operation of the user, and the switching response time is long.
In addition, through the above manner, developers need to strictly follow the multi-language development specification of the used front-end framework in the development process, the technical requirements on the developers are high, json files need to be maintained, hierarchical relationships often exist among display objects in a page, and the json files are difficult to maintain when the hierarchy of the display objects in the page is deep.
Disclosure of Invention
The invention aims to provide a method, a device, a storage medium and electronic equipment for accurately and quickly switching static page languages.
In order to achieve the above object, according to a first aspect of the present disclosure, there is provided a static page language switching method, the method including:
when the language of a static page is switched, determining a target display language to which the static page is switched;
determining a target display page corresponding to the target display language from a page set corresponding to the static page, wherein the page set comprises display pages corresponding to the static page respectively in a plurality of display languages, and the display pages are generated based on a configuration file of the static page;
displaying the target display page, wherein the content of the target display page is displayed through the target display language.
Optionally, the configuration file of the static page is generated by:
acquiring a source code of the static page;
acquiring a path of a display object in the static page and display data of the display object according to the source code;
and associating the path of the display object with the display data of the display object, and storing the path of the display object and the display data of the display object in the configuration file.
Optionally, the display page is generated based on the configuration file of the static page by:
acquiring a plurality of configuration files corresponding to the static page and a source code of the static page, wherein each configuration file corresponds to one display language;
for each configuration file, the following operations are performed:
and replacing the data corresponding to the path of the display object in the source code of the static page by the display data associated with the path of the display object in the configuration file to obtain the display page corresponding to the static page in the display language corresponding to the configuration file.
Optionally, the display language of the static page corresponds to the configuration files of the static page one to one, and the paths and the number of the display objects in different configuration files of the static page are the same.
Optionally, the configuration file is generated based on key-value pairs.
According to a second aspect of the present disclosure, there is provided a static page language switching apparatus, the apparatus comprising:
the first determining module is used for determining a target display language to which the static page is switched when the static page is switched in language;
a second determining module, configured to determine a target display page corresponding to the target display language from a page set corresponding to the static page, where the page set includes display pages corresponding to the static pages in multiple display languages, and the display pages are generated based on a configuration file of the static pages;
and the display module is used for displaying the target display page, wherein the content of the target display page is displayed through the target display language.
Optionally, the configuration file of the static page is generated by:
acquiring a source code of the static page;
acquiring a path of a display object in the static page and display data of the display object according to the source code;
and associating the path of the display object with the display data of the display object, and storing the path of the display object and the display data of the display object in the configuration file.
Optionally, the display page is generated based on the configuration file of the static page by:
acquiring a plurality of configuration files corresponding to the static page and a source code of the static page, wherein each configuration file corresponds to one display language;
for each configuration file, the following operations are performed:
and replacing the data corresponding to the path of the display object in the source code of the static page by the display data associated with the path of the display object in the configuration file to obtain the display page corresponding to the static page in the display language corresponding to the configuration file.
Optionally, the display language of the static page corresponds to the configuration files of the static page one to one, and the paths and the number of the display objects in different configuration files of the static page are the same.
Optionally, the configuration file is generated based on key-value pairs.
According to a third aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of any of the methods of the first aspect described above.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method of any of the first aspects above.
In the technical scheme, when the language of the static page is switched, the target display language to which the static page is switched is determined, the target display page corresponding to the target display language is determined from the page set corresponding to the static page, and the target display page is displayed, so that the switching of the display language of the static page is realized. According to the technical scheme, the page set comprising the display pages corresponding to the static pages under the display languages is generated in advance, and the display pages are generated based on the configuration files of the static pages, so that when the target display pages are determined, the display pages can be directly displayed, dynamic rendering of the static pages based on json files in the prior art is avoided, and the page response speed is improved. In addition, in the scheme of the disclosure, the static pages in the multiple display languages are directly generated, so that compared with the prior art, the maintenance of the display pages is performed, and no matter how deep the control content in the page is in the hierarchy, the multiple pages in the page set can be conveniently maintained, and the efficiency and the speed of switching the languages of the static pages are further improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flowchart of a static page language switching method provided according to one embodiment of the present disclosure;
FIG. 2 is a schematic illustration of a static page;
FIG. 3 is a flow diagram of a manner in which a configuration file for a static page is generated according to one embodiment of the present disclosure;
FIG. 4 is a block diagram of a static page language switching apparatus provided in accordance with one embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Fig. 1 is a flowchart illustrating a static page language switching method according to an embodiment of the disclosure. As shown in fig. 1, the method includes:
in S11, when the static page is subjected to language switching, the target display language to which the static page is to be switched is determined.
The static page refers to a page which can be directly loaded to a client browser to be displayed without being compiled by a server. Illustratively, as shown in fig. 2, a schematic diagram of a static page is shown, wherein a point a at the upper right corner of the static page is a part for representing the current display language. Illustratively, as shown in FIG. 2, the current display language of the static page is "Chinese". At this time, if the user wants to switch the display language, he or she may select the display language he or she wants to switch from the provided selectable languages by selecting it at the a point position, for example, he or she may select "english" when he or she wants to switch to english display. And switching languages when the user confirms to select, and acquiring the switched language information based on the URL initiated corresponding to the switched language so as to determine the target display language. The target display language to which the static page is to be switched is determined based on the URL, which may be determined according to a name, a path, a language identifier, or the like of the static page in the URL, and which manner may be determined based on the development design of the static page, which is not limited in this disclosure.
In S12, a target display page corresponding to a target display language is determined from a page set corresponding to a static page, where the page set includes display pages corresponding to the static page in a plurality of display languages, and the display pages are generated based on a configuration file of the static page.
That is to say, in the present disclosure, the display pages corresponding to the static page in the multiple display languages are multiple static pages generated in the development phase, and when the display languages of the static page are switched, the target display page corresponding to the target display language can be directly determined without performing dynamic rendering.
In S13, a target display page is displayed, wherein the content of the target display page is displayed in the target display language.
In the technical scheme, when the language of the static page is switched, the target display language to which the static page is switched is determined, the target display page corresponding to the target display language is determined from the page set corresponding to the static page, and the target display page is displayed, so that the switching of the display language of the static page is realized. According to the technical scheme, the page set comprising the display pages corresponding to the static pages under the display languages is generated in advance, and the display pages are generated based on the configuration files of the static pages, so that when the target display pages are determined, the display pages can be directly displayed, dynamic rendering of the static pages based on json files in the prior art is avoided, and the page response speed is improved. In addition, in the scheme of the disclosure, the static pages in the multiple display languages are directly generated, so that compared with the prior art, the maintenance of the display pages is performed, and no matter how deep the control content in the page is in the hierarchy, the multiple pages in the page set can be conveniently maintained, and the efficiency and the speed of switching the languages of the static pages are further improved.
Optionally, as shown in fig. 3, the configuration file of the static page is generated as follows:
in S21, the source code of the static page is acquired;
in S22, the path of the display object and the display data of the display object in the static page are acquired from the source code.
Illustratively, the static page may be designed based on a page design tool, such as a multi-page editor developed based on an xml metadata model. For example, the design page provides a draggable control library and a drawing board, the control library mainly comprises basic controls (such as buttons, text boxes, number boxes, date boxes and the like), container controls (such as tab containers, title containers, guide containers, pop-up box containers and the like), and mode controls (mode guides capable of quickly generating the above control combinations), and the drawing board adopts a fixed width and height and supports dragging and changing the size. In addition, an outline view and a property view are provided, wherein the outline view uses small icons to identify the hierarchical relationship of the control, and the property view is used for editing the property of the control and the event script. Therefore, after the static page design is completed, the source code of the static page can be automatically obtained.
In addition, a developer can directly write the static page based on the HTML language, and can obtain the source code of the static page when the static page is displayed after writing.
The display object comprises a display tag corresponding to display data in the static page and a display attribute corresponding to the display data in the static page, and the display data refers to display content in the static page. Examples are as follows:
< a href ═ http:// www.XXX.com.cn "> user registration >
The "user registration" is the display data in the static page and the tag < a > is a display tag, i.e., display object.
For another example:
< title >
Then, the "account" and "please note" are both display data, where the "account" is the display data corresponding to the tag < p >, and the tag < p > is the display tag; note that "note" is display data corresponding to the attribute "title", and the attribute "title" is a display attribute, and two display objects, a tag < p > and an attribute "title", respectively, correspond to the statement.
In S23, the path of the display object is associated with the display data of the display object and stored in the configuration file.
In the technical scheme, the display objects corresponding to the display data in the static page can be extracted, the paths of the display objects and the display data of the display objects are stored in an associated manner, and for the same static page, the paths of all the display objects are unique, so that the display objects in the static page can be uniformly maintained based on the configuration file, and multi-language adaptation can be conveniently performed subsequently.
Optionally, the configuration file is generated based on a key-value pair, that is, in a form of < key, value >, where key is a path of the display object and value is display data corresponding to the display object. The configuration file is generated in a key-value pair mode, so that the uniform format of the configuration file can be facilitated, meanwhile, the display data can be conveniently inquired, and support is provided for the subsequent generation of a display page based on the configuration file.
Optionally, the display language of the static page corresponds to the configuration files of the static page one to one, and the paths and the number of the display objects in different configuration files of the static page are the same.
For example, a static page designed by a developer is shown in fig. 2, and when performing multi-language adaptation on the static page, a configuration file may be generated based on the static page, where a manner of generating the configuration file is described in detail above, and is not described herein again.
Illustratively, the generated profile part content is as follows:
name _ label.value ═ name
User account id, account id
User, email _ label, value ═ mail address
User mobile telephone label value contact telephone
User unit label belonging to the same organization as the original organization
Description information of user, description _ label, value
To facilitate automatic generation of display pages, a corresponding configuration file may be maintained for each display language. After the configuration file is generated, configuration files corresponding to other display languages can be generated based on the configuration file. For example, the configuration file may be copied into multiple copies, and the display language in the configuration file may be adaptively modified according to the display language, and the configuration file corresponding to english is obtained as follows, for example:
X.org.view.user.name_label.value=name
X.org.view.user.account_label.value=account
X.org.view.user.email_label.value=email
X.org.view.user.mobileTelephone_label.value=mobileTelephone
X.org.view.user.unit_label.value=unit
X.org.view.user.description_label.value=description
that is to say, paths and numbers of the display objects in different configuration files of the static page are the same, and display data corresponding to the display objects can be set according to an actual display language. Therefore, the configuration files of the static page can be generated quickly and conveniently, and therefore the display pages can be generated conveniently.
Optionally, the display page is generated based on the configuration file of the static page by:
acquiring a plurality of configuration files corresponding to the static page and a source code of the static page, wherein each configuration file corresponds to one display language;
for each configuration file, the following operations are performed:
and replacing the data corresponding to the path of the display object in the source code of the static page by the display data associated with the path of the display object in the configuration file to obtain the display page corresponding to the static page in the display language corresponding to the configuration file.
In an embodiment, the source code of the static page may be source code in a development phase, and when the display page is generated according to the configuration file and the source code, data corresponding to the path of the display object may be queried from the source code for the path of the display object in the configuration file, so that the data corresponding to the path of the display object in the source code of the static page is replaced with the display data associated with the display object in the configuration file.
For example, the following description takes a display object in an english configuration file as an example:
according to the 'x.org.view.user.name _ label.value ═ name', the display data corresponding to the 'x.org.view.user.name _ label' is inquired from the static page source code and is 'name', the 'name' can be replaced by the 'name' in the configuration file, and so on, and after the replacement of the display object in the configuration file is completed, the display page corresponding to the English can be obtained.
In another embodiment, in generating the configuration file according to the source code of the static page, the mode character string may be generated according to the stored path of the display object and the association of the display data in the configuration file, so as to replace the display data corresponding to the display object in the source code. Illustratively, the "name" of the display data in the source code is replaced with "$ { x.org.view.user. Therefore, when the display page is generated according to the source code after replacement, when the mode character string is inquired in the source code, the corresponding display data can be inquired from the configuration file according to the mode character string, and the inquired display data replaces the data corresponding to the path of the display object in the source code of the static page.
By way of example, the following is described using an english configuration file as an example:
when "$ { x.org.view.user.name _ label.value } is queried from the source code, corresponding display data is queried from the english configuration file according to the mode character string, the queried display data is" name ", the" name "in the configuration file can be used to replace the" name ", and so on, and after the replacement of the mode character string in the source code is completed, the display page corresponding to the english can be obtained.
Therefore, by the mode, the plurality of display pages corresponding to the static pages can be automatically generated based on the configuration file, developers do not need to manually develop the display pages, the workload of the developers is effectively reduced, and meanwhile, the accuracy and the efficiency of the generated display pages can be ensured.
Optionally, after a plurality of display pages are generated, setting may be performed for each display page, for example, typesetting is performed for different display languages, so that readability of a target display language obtained after multi-language switching of a static page may be ensured, a phenomenon that page content is not adapted after switching of the display page due to only a single page in the prior art is avoided, accuracy of language switching of the static page is improved, and user experience is improved.
The present disclosure further provides a static page language switching apparatus, as shown in fig. 4, where the apparatus 10 includes:
a first determining module 100, configured to determine, when a language of a static page is switched, a target display language to which the static page is to be switched;
a second determining module 200, configured to determine a target display page corresponding to the target display language from a page set corresponding to the static page, where the page set includes display pages corresponding to the static page in multiple display languages, and the display pages are generated based on a configuration file of the static page;
a display module 300, configured to display the target display page, where the content of the target display page is displayed through the target display language.
Optionally, the configuration file of the static page is generated by:
acquiring a source code of the static page;
acquiring a path of a display object in the static page and display data of the display object according to the source code;
and associating the path of the display object with the display data of the display object, and storing the path of the display object and the display data of the display object in the configuration file.
Optionally, the display page is generated based on the configuration file of the static page by:
acquiring a plurality of configuration files corresponding to the static page and a source code of the static page, wherein each configuration file corresponds to one display language;
for each configuration file, the following operations are performed:
and replacing the data corresponding to the path of the display object in the source code of the static page by the display data associated with the path of the display object in the configuration file to obtain the display page corresponding to the static page in the display language corresponding to the configuration file.
Optionally, the display language of the static page corresponds to the configuration files of the static page one to one, and the paths and the number of the display objects in different configuration files of the static page are the same.
Optionally, the configuration file is generated based on key-value pairs.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 5 is a block diagram illustrating an electronic device 700 according to an example embodiment. As shown in fig. 5, the electronic device 700 may include: a processor 701 and a memory 702. The electronic device 700 may also include one or more of a multimedia component 703, an input/output (I/O) interface 704, and a communication component 705.
The processor 701 is configured to control the overall operation of the electronic device 700, so as to complete all or part of the steps in the static page language switching method. The memory 702 is used to store various types of data to support operation at the electronic device 700, such as instructions for any application or method operating on the electronic device 700 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and the like. The Memory 702 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, 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 disk, or optical disk. The multimedia components 703 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 702 or transmitted through the communication component 705. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 704 provides an interface between the processor 701 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 705 may thus include: Wi-Fi module, Bluetooth module, NFC module, etc.
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, microcontrollers, microprocessors, or other electronic components for performing the static page language switching method described above.
In another exemplary embodiment, there is also provided a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the static page language switching method described above. For example, the computer readable storage medium may be the memory 702 comprising program instructions executable by the processor 701 of the electronic device 700 to perform the static page language switching method described above.
Fig. 6 is a block diagram illustrating an electronic device 1900 according to an example embodiment. For example, the electronic device 1900 may be provided as a server. Referring to fig. 6, an electronic device 1900 includes a processor 1922, which may be one or more in number, and a memory 1932 for storing computer programs executable by the processor 1922. The computer program stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processor 1922 may be configured to execute the computer program to perform the static page language switching method described above.
Additionally, electronic device 1900 may also include a power component 1926 and a communication component 1950, the power component 1926 may be configured to perform power management of the electronic device 1900, and the communication component 1950 may be configured to enable communication, e.g., wired or wireless communication, of the electronic device 1900. In addition, the electronic device 1900 may also include input/output (I/O) interfaces 1958. The electronic device 1900 may operate based on an operating system, such as Windows Server, MacOS XTM, UnixTM, Linux, etc., stored in memory 1932.
In another exemplary embodiment, there is also provided a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the static page language switching method described above. For example, the computer readable storage medium may be the memory 1932 described above that includes program instructions that are executable by the processor 1922 of the electronic device 1900 to perform the static page language switching method described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the static page language switching method described above when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (10)

1. A static page language switching method, characterized in that the method comprises:
when the language of a static page is switched, determining a target display language to which the static page is switched;
determining a target display page corresponding to the target display language from a page set corresponding to the static page, wherein the page set comprises display pages corresponding to the static page respectively in a plurality of display languages, and the display pages are generated based on a configuration file of the static page;
displaying the target display page, wherein the content of the target display page is displayed through the target display language.
2. The method of claim 1, wherein the configuration file for the static page is generated by:
acquiring a source code of the static page;
acquiring a path of a display object in the static page and display data of the display object according to the source code;
and associating the path of the display object with the display data of the display object, and storing the path of the display object and the display data of the display object in the configuration file.
3. The method of claim 2, wherein the display page is generated based on the configuration file of the static page by:
acquiring a plurality of configuration files corresponding to the static page and a source code of the static page, wherein each configuration file corresponds to one display language;
for each configuration file, the following operations are performed:
and replacing the data corresponding to the path of the display object in the source code of the static page by the display data associated with the path of the display object in the configuration file to obtain the display page corresponding to the static page in the display language corresponding to the configuration file.
4. The method according to claim 1, wherein the display language of the static page and the configuration file of the static page are in one-to-one correspondence, and the paths and the number of the display objects in different configuration files of the static page are the same.
5. The method of any of claims 1-4, wherein the configuration file is generated based on key-value pairs.
6. An apparatus for static page language switching, the apparatus comprising:
the first determining module is used for determining a target display language to which the static page is switched when the static page is switched in language;
a second determining module, configured to determine a target display page corresponding to the target display language from a page set corresponding to the static page, where the page set includes display pages corresponding to the static pages in multiple display languages, and the display pages are generated based on a configuration file of the static pages;
and the display module is used for displaying the target display page, wherein the content of the target display page is displayed through the target display language.
7. The apparatus of claim 6, wherein the configuration file for the static page is generated by:
acquiring a source code of the static page;
acquiring a path of a display object in the static page and display data of the display object according to the source code;
and associating the path of the display object with the display data of the display object, and storing the path of the display object and the display data of the display object in the configuration file.
8. The apparatus of claim 7, wherein the display page is generated based on a configuration file of the static page by:
acquiring a plurality of configuration files corresponding to the static page and a source code of the static page, wherein each configuration file corresponds to one display language;
for each configuration file, the following operations are performed:
and replacing the data corresponding to the path of the display object in the source code of the static page by the display data associated with the path of the display object in the configuration file to obtain the display page corresponding to the static page in the display language corresponding to the configuration file.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 5.
CN201911260129.5A 2019-12-10 2019-12-10 Static page language switching method and device, storage medium and electronic equipment Pending CN111124406A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911260129.5A CN111124406A (en) 2019-12-10 2019-12-10 Static page language switching method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911260129.5A CN111124406A (en) 2019-12-10 2019-12-10 Static page language switching method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN111124406A true CN111124406A (en) 2020-05-08

Family

ID=70498102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911260129.5A Pending CN111124406A (en) 2019-12-10 2019-12-10 Static page language switching method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111124406A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857924A (en) * 2020-07-21 2020-10-30 哈尔滨海能达科技有限公司 Multi-language implementation method and device for terminal

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182425A (en) * 2013-05-28 2014-12-03 北京信威通信技术股份有限公司 Static page generation method for multi-language website
CN107122190A (en) * 2017-04-27 2017-09-01 努比亚技术有限公司 A kind of multilingual static page generation method, server and storage medium
CN107832052A (en) * 2017-10-11 2018-03-23 东软集团股份有限公司 Show the method, apparatus and storage medium and electronic equipment of preview page
CN108241731A (en) * 2017-10-18 2018-07-03 北京车和家信息技术有限公司 Webpage multi-language switching method, device, computer equipment and storage medium
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104182425A (en) * 2013-05-28 2014-12-03 北京信威通信技术股份有限公司 Static page generation method for multi-language website
CN107122190A (en) * 2017-04-27 2017-09-01 努比亚技术有限公司 A kind of multilingual static page generation method, server and storage medium
CN107832052A (en) * 2017-10-11 2018-03-23 东软集团股份有限公司 Show the method, apparatus and storage medium and electronic equipment of preview page
CN108241731A (en) * 2017-10-18 2018-07-03 北京车和家信息技术有限公司 Webpage multi-language switching method, device, computer equipment and storage medium
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857924A (en) * 2020-07-21 2020-10-30 哈尔滨海能达科技有限公司 Multi-language implementation method and device for terminal

Similar Documents

Publication Publication Date Title
WO2018077085A1 (en) Application processing method, device and storage medium
US20150324336A1 (en) Content localization
JP5911594B2 (en) Providing translation support for application localization
CN107451162B (en) Network resource access device, hybrid device and method
US9760551B2 (en) Generating regular expression
CN108595445A (en) Interpretation method, device and terminal
CN106155673B (en) Method, device, server and user equipment for realizing page content editor
US10656955B1 (en) Modifying readable and focusable elements on a page during execution of automated scripts
CN107832052B (en) Method and device for displaying preview page, storage medium and electronic equipment
CN109145272B (en) Text rendering and layout method, device, equipment and storage medium
KR20140126702A (en) Extension activation for related documents
CN111045653B (en) System generation method and device, computer readable medium and electronic equipment
CN111368180A (en) Page display method and device and electronic equipment
CN112925463A (en) Information flow publishing processing method, device, medium and electronic equipment
CN112395027A (en) Widget interface generation method and device, storage medium and electronic equipment
CN110968314A (en) Page generation method and device
CN116820635A (en) Document block sharing method, device, system and storage medium
CN111124406A (en) Static page language switching method and device, storage medium and electronic equipment
US11126410B2 (en) Method and apparatus for building pages, apparatus and non-volatile computer storage medium
CN115081423A (en) Document editing method and device, electronic equipment and storage medium
CN108228179A (en) The international processing method of the page, device, computer and storage medium
CN114528510A (en) Webpage data processing method and device, electronic equipment and medium
US11120099B2 (en) Rendering a web element in a web page
CN113656041A (en) Data processing method, device, equipment and storage medium
US20160147741A1 (en) Techniques for providing a user interface incorporating sign language

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