CN110795192B - Language switching method and device and terminal equipment - Google Patents

Language switching method and device and terminal equipment Download PDF

Info

Publication number
CN110795192B
CN110795192B CN201911035690.3A CN201911035690A CN110795192B CN 110795192 B CN110795192 B CN 110795192B CN 201911035690 A CN201911035690 A CN 201911035690A CN 110795192 B CN110795192 B CN 110795192B
Authority
CN
China
Prior art keywords
language
page
module
package
target
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.)
Active
Application number
CN201911035690.3A
Other languages
Chinese (zh)
Other versions
CN110795192A (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.)
Vidaa Netherlands International Holdings BV
Original Assignee
Vidaa Netherlands International Holdings BV
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 Vidaa Netherlands International Holdings BV filed Critical Vidaa Netherlands International Holdings BV
Priority to CN201911035690.3A priority Critical patent/CN110795192B/en
Publication of CN110795192A publication Critical patent/CN110795192A/en
Application granted granted Critical
Publication of CN110795192B publication Critical patent/CN110795192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/485End-user interface for client configuration
    • H04N21/4856End-user interface for client configuration for language selection, e.g. for the menu or subtitles
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The embodiment of the invention provides a language switching method, a device and terminal equipment, wherein the method comprises the following steps: when a language switching instruction is received, a target language type in the language switching instruction is obtained, if the target language type is not the language type used by the current display page, a target system level language package corresponding to the target language type is obtained, the target system level language package is loaded, a first module level language package corresponding to a first page module to which the current display page belongs is obtained, the first module level language package is loaded, so that the language type used by the current display page is switched to the target language type, when the language switching is carried out, only the system level language package and part of the module level language package are loaded, and the volume of a file to be loaded is smaller, so that the file loading time is shorter, the time required for carrying out the language switching is shorter, a longer switching waiting time is avoided, and the user experience is improved.

Description

Language switching method and device and terminal equipment
Technical Field
The embodiment of the invention relates to the technical field of terminals, in particular to a language switching method, a device and terminal equipment.
Background
With the development of economy and technology, the popularity of smart televisions is higher and higher, and the provided functions are also more and more abundant. In order to facilitate the use of users using different languages, it is necessary to make the smart tv support multi-language display, i.e. to switch the language used by the tv interface from one language to another.
In the prior art, when the language is switched, a new language type which is used by a user to want a television interface is generally obtained, then all language resource files corresponding to the new language type are obtained and loaded, and after loading is completed, the language type used by the television interface is switched to the new language type.
However, the inventors found that there are at least the following problems in the prior art: when the language is switched, after all language resource files corresponding to the new language types are loaded, the language types used by the television interface can be switched to the new language types, and as the total volume of all the language resource files corresponding to the language types is larger, the time required for switching the language is longer, and accordingly, a user needs to experience longer switching waiting time, so that the user experience is reduced.
Disclosure of Invention
The embodiment of the invention provides a language switching method, a device and terminal equipment, which are used for reducing the time required by language switching.
In a first aspect, an embodiment of the present invention provides a language switching method, including:
when a language switching instruction is received, acquiring a target language type in the language switching instruction;
if the target language type is not the language type used by the current display page, acquiring a target system level language package corresponding to the target language type, and loading the target system level language package;
and acquiring a first module level language package corresponding to a first page module to which the current display page belongs, and loading the first module level language package so as to switch the language type used by the current display page into the target language type.
In one possible design, after said loading said first module level language pack, further comprising:
when a current display page is switched to a first page, judging whether a page module to which the first page belongs is the first page module or not;
if the language type is not the first page module, a second module level language package corresponding to the page module to which the first page belongs is obtained, and the second module level language package is loaded, so that the language type used by the first page is switched to the target language type.
In one possible design, the determining whether the page module to which the first page belongs is the first page module includes:
judging whether the language type used by the current display page changes or not;
if the language type used by the current display page is determined to be changed, judging whether the page module to which the first page belongs is the first page module or not.
In one possible design, the target system level language package includes a target first system level language package and a target second system level language package.
In one possible design, before the obtaining, when the language switching instruction is received, the target language type in the language switching instruction further includes:
when a starting instruction is received, starting initialization processing is carried out;
in the process of starting up initialization, a first system level language package corresponding to an initial language type is obtained, and the first system level language package is loaded;
when entering an initial display page, acquiring an initial module level language package corresponding to a page module to which the initial page belongs, and loading the initial module level language package so that the language type used by the initial page is the initial language type;
After the startup initialization is finished, a second system level language package corresponding to the initial language type is obtained, and the second system level language package is loaded.
In one possible design, before the obtaining, when the language switching instruction is received, the target language type in the language switching instruction further includes:
acquiring a language package corresponding to each usable language type, wherein the language package comprises a plurality of language resource files;
and classifying the language resource files included in each language package aiming at each language package to obtain a system-level language package corresponding to the language type and a module-level language package corresponding to each preset page module.
In a second aspect, an embodiment of the present invention provides a language switching apparatus, including:
the instruction receiving module is used for acquiring a target language type in the language switching instruction when the language switching instruction is received;
the system level language package loading module is used for acquiring a target system level language package corresponding to the target language type and loading the target system level language package if the target language type is not the language type used by the current display page;
the module-level language package loading module is used for acquiring a first module-level language package corresponding to a first page module to which a current display page belongs, and loading the first module-level language package so as to switch the language type used by the current display page into the target language type.
In one possible design, the apparatus further comprises a page switch module;
the page switching module is used for judging whether the page module to which the first page belongs is the first page module or not when the current display page is switched to the first page after the first module-level language packet is loaded;
if the language type is not the first page module, a second module level language package corresponding to the page module to which the first page belongs is obtained, and the second module level language package is loaded, so that the language type used by the first page is switched to the target language type.
In one possible design, the page switching module is specifically configured to:
judging whether the language type used by the current display page changes or not;
if the language type used by the current display page is determined to be changed, judging whether the page module to which the first page belongs is the first page module or not.
In one possible design, the target system level language package includes a target first system level language package and a target second system level language package.
In one possible design, the instruction receiving module is further configured to: before the target language type in the language switching instruction is obtained when the language switching instruction is received, starting initialization processing is carried out when a starting instruction is received;
In the process of starting up initialization, a first system level language package corresponding to an initial language type is obtained, and the first system level language package is loaded;
when entering an initial display page, acquiring an initial module level language package corresponding to a page module to which the initial page belongs, and loading the initial module level language package so that the language type used by the initial page is the initial language type;
after the startup initialization is finished, a second system level language package corresponding to the initial language type is obtained, and the second system level language package is loaded.
In one possible design, the instruction receiving module is further configured to: before the target language type in the language switching instruction is obtained when the language switching instruction is received, obtaining a language package corresponding to each usable language type, wherein the language package comprises a plurality of language resource files;
and classifying the language resource files included in each language package aiming at each language package to obtain a system-level language package corresponding to the language type and a module-level language package corresponding to each preset page module.
In a third aspect, an embodiment of the present invention provides a terminal device, including: at least one processor and memory;
The memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the language switching method of any one of the first aspects.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where computer-executable instructions are stored, which when executed by a processor, implement the language switching method according to any one of the first aspects.
The embodiment of the invention provides a language switching method, a device and terminal equipment, which are characterized in that when a language switching instruction is received, whether a target language type in the language switching instruction is a language type used by a current display page of a terminal is determined, namely whether the language type used by the terminal is required to be switched to the target language type is determined, if the language type used by the terminal is determined to be switched to the target language type, a target system-level language package corresponding to the target language type is loaded first, so that a user can normally browse and operate the terminal, then only a first module-level language package corresponding to a first page module to which the current display page belongs is required to be loaded, and the language type used by the current display page can be switched to the target language type, namely, when the language switching is performed, only the system-level language package and part of module-level language packages are required to be loaded, all language resource files are not required to be loaded, and the volume of the files required to be loaded is smaller, so that the time required by the language switching is shorter, the user is prevented from experiencing a longer switching waiting time, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
FIG. 1 is a schematic diagram of a language switching system according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a language switching method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a language pack according to an embodiment of the present invention;
FIG. 4 is a second flowchart of a language switching method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a language switching device according to an embodiment of the present invention;
fig. 6 is a schematic hardware structure of a terminal device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic diagram of a language switching system according to an embodiment of the present invention. As shown in fig. 1, the system includes a remote controller 100A, a mobile terminal 100B and a terminal 200, and a user can control the terminal 200 through remote control devices such as the remote controller 100A or the mobile terminal 100B to perform certain operations, for example, control an initial language used by a page of the terminal to be an a language and a familiar language of the user to be a B language, and for convenience of use of the user, the user can send a language switching instruction to the terminal through the remote control device to control the terminal to switch the language used by the page from the a language to the B language, so as to realize language switching.
In the prior art, when the terminal performs language switching, generally, a new language type which is used by a user and wanted to be used by a television page is obtained first, then all language resource files corresponding to the new language type are obtained and loaded, and after loading is completed, the language type used by the television page is switched to the new language type. The language type used by the television interface can be switched to the new language type only after all language resource files corresponding to the new language type are loaded, and the total volume of all the language resource files corresponding to the language type is larger, so that the time required for switching the language is longer, correspondingly, a user needs to experience longer switching waiting time, and the user experience is reduced.
Aiming at the problems existing in the prior art, the application provides a language switching method, a device and a terminal device, wherein when a language switching instruction is received, the method determines whether the target language type in the language switching instruction is the language type used by a current display page of a terminal, namely, whether the language type used by the terminal needs to be switched to the target language type is determined, if the language type used by the terminal needs to be switched to the target language type, a target system-level language package corresponding to the target language type is loaded firstly, so that a user can browse and operate the terminal normally, and then only a first module-level language package corresponding to a first page module to which the current display page belongs is loaded, so that the language type used by the current display page can be switched to the target language type, namely, when the language switching is performed, only the system-level language package and part of module-level language package are loaded, all language resource files do not need to be loaded, the time required by the language switching is shorter, the user is prevented from experiencing a longer switching waiting time, and the user experience is improved.
The page module is actually a service module, and is composed of pages for realizing a certain service function, and in a development stage, the page module is divided according to the attribute of the page to obtain different page modules.
In fig. 1, the terminal 200 is merely an example, and in practical application, the terminal 200 may be a terminal including a display screen, or may be a terminal not including a display screen, which is not limited herein.
The technical scheme of the invention is described in detail below by specific examples. The following embodiments may be combined with each other, and some embodiments may not be repeated for the same or similar concepts or processes.
Fig. 2 is a flowchart of a language switching method according to an embodiment of the present invention, where the execution subject of the embodiment may be a terminal in the embodiment shown in fig. 1, and the embodiment is not limited herein. As shown in fig. 2, the method of the present embodiment may include:
s201: and when the language switching instruction is received, acquiring the target language type in the language switching instruction.
In this embodiment, when the user needs to switch the language types, the user may select a desired language type, i.e., a target language type, through a remote control device such as a remote controller, and then send a language switching instruction to the terminal through the remote control device, where the language switching instruction includes the target language type, i.e., the language type that the user wants the terminal to use. After receiving the language switching instruction, the terminal acquires the target language type in the language switching instruction.
The language type actually refers to languages such as english, korean, and the like.
After the terminal is started, the terminal needs to be started initialization processing firstly, and in the process of starting initialization, the language is generally required to be initialized, namely, the terminal used by the terminal is initialized to be of an initial language type, and the specific process is as follows: and when a starting instruction is received, starting initialization processing is carried out. And in the process of starting up initialization, acquiring a first system level language package corresponding to the initial language type, and loading the first system level language package. When entering an initial display page, acquiring an initial module level language package corresponding to a page module to which the initial page belongs, and loading the initial module level language package so that the language type used by the initial page is the initial language type. After the startup initialization is finished, a second system level language package corresponding to the initial language type is obtained, and the second system level language package is loaded.
In this embodiment, after receiving a power-on instruction sent by a user through a remote control device, power-on initialization processing is started. And in the process of starting up initialization processing, a first system level language package corresponding to the initial language type is firstly obtained, the first system level language package is loaded, the first system level language package is required to be loaded in the process of starting up initialization processing, after the first system level language package is loaded, the initial module level language package corresponding to a page module to which the initial page belongs is started to be loaded, so that the language type used by the initial page is the initial language type, after the starting up initialization is finished, a second system level language package corresponding to the initial language type is loaded, and after the second system level language package is loaded, a user can browse and operate the terminal normally.
In the process of starting up initialization, only the first system level language package corresponding to the initial language type and the initial module level language package corresponding to the initial page are loaded, and as the volume of the split system level and module level language package is smaller, the time required for loading the language package is shorter, and the initial module level language package is loaded before the second system level language package corresponding to the initial language type is loaded, the terminal can display the initial page in a shorter time, the process of facing one non-picture initialization for a long time by a user is not needed, and the user experience is improved.
When the language package after splitting is utilized to perform language switching, the language package comprising all resource files for realizing a certain language type is required to be split first, so as to obtain a module-level language package and a system-level language package corresponding to the language package, when the loading of the system-level language package is finished, a user can normally browse and operate the terminal, and when the loading of a certain module-level language package is finished, the language type used by a page in a page module corresponding to the module-level language package can be the language type, wherein the specific process for unpacking the language package comprises the following steps: and obtaining a language package corresponding to each usable language type, wherein the language package comprises a plurality of language resource files. And classifying the language resource files included in each language package aiming at each language package to obtain a system-level language package corresponding to the language type and a module-level language package corresponding to each preset page module.
Wherein the system level language package comprises a first system level language package and a second system level language package. The first system level language package is generally loaded during the process of starting up initialization, and the second system level language package is generally loaded after the starting up initialization is completed. After the first system level language package and the second system level language package are loaded, the user can browse and operate the terminal normally, and correspondingly, the target system level language package comprises a target first system level language package and a target second system level language package.
Optionally, when classifying the language resource files included in the language package, the language resource files may be classified according to file identifiers of the language resource files, and the specific process includes: the method comprises the steps of obtaining file identifiers of all language resource files included in a first language package, obtaining all first language resource files with the file identifiers being first system level file identifiers, forming a first system level language package, searching all second language resource files with the file identifiers being second system level file identifiers, and forming a second system level language package. And searching third language resource files with file identifications belonging to the file identifications included in the preset page module aiming at each preset page module, and forming a module-level language package corresponding to the preset page module by using all the searched third language resource files.
Wherein the first language pack is any one of the language packs.
In this embodiment, the first system level file identifier, the second system level file identifier, and the file identifier included in each page module may be determined from a preset file table, the language resource files included in the language package are classified according to the file identifiers thereof, so as to implement classification of the language package, and as shown in fig. 3, the language package source is split to obtain a first system level language package source_1. Js, a second system level language package source_system_2. Js, a module level language package source_home. Js, and a module level language package source_tv.
In this embodiment, before a user uses a terminal, all language types available to the terminal and language packages corresponding to each language type may be obtained, for each language package, a language resource file included in the language package is classified, and a system-level language package corresponding to the language type and each preset page module, that is, a module-level language package corresponding to a page module available to the terminal, are determined, so that the splitting of the language package is implemented.
S202: if the target language type is not the language type used by the current display page, acquiring a target system level language package corresponding to the target language type, and loading the target system level language package.
In this embodiment, when it is determined that the target language type is not the language type used by the current display page, it indicates that the language type used by the current display page needs to be switched, a target system level language package corresponding to the target language type is obtained, the target system level language package is loaded, and after the system level language package is loaded, the user can browse and operate the terminal normally. If the target language type is the language type used by the current display page, language switching is not needed.
Because the language types are generally switched for convenient use in the process of using the terminal by the user, when the language types used by the current display page need to be switched, all target system level language packages can be directly loaded, and the target first system level language packages and the target second system level language packages do not need to be loaded separately at different times.
S203: and acquiring a first module-level language packet corresponding to a first page module to which the current display page belongs, and loading the first module-level language packet so as to switch the language type used by the current display page into the target language type.
In this embodiment, a first module level language package corresponding to a first page module to which a current display page belongs is obtained, and the first page module level language package is loaded, and when the first page module level language package is recorded, the language type used by the current display page can be switched to a target language type, i.e. the language type of the content displayed by the current display page is switched to the target language type.
The first module level language package is actually the module level language package of the target language type corresponding to the first page module.
From the above description, it can be known that, when the language switching instruction is received, whether the target language type in the language switching instruction is the language type used by the current display page of the terminal is determined, that is, whether the language type used by the terminal needs to be switched to the target language type is determined, if the language type used by the terminal needs to be switched to the target language type, the target system level language package corresponding to the target language type is loaded first, so that the user can browse and operate the terminal normally, then only the first module level language package corresponding to the first page module to which the current display page belongs is loaded, and switching the language type used by the current display page to the target language type can be realized, that is, when the language switching is performed, only the system level language package and part of the module level language packages are loaded, all language resource files do not need to be loaded, the file loading time is shorter, the time required for performing the language switching is shorter, the user is prevented from experiencing a longer switching waiting time, and the user experience is improved.
When switching from the currently displayed page to the other page, the language type used by the other page needs to be switched to the target language type, and the process of switching the language type used by the other page to the target language type will be described in detail below with reference to a specific embodiment.
Fig. 4 is a flowchart two of a language switching method provided in the embodiment of the present invention, as shown in fig. 4, and details a specific implementation process of switching a language type used by another page to a target language type on the basis of the above embodiment, as shown in fig. 4, where the method includes:
s401: and when the language switching instruction is received, acquiring the target language type in the language switching instruction.
S402: if the target language type is not the language type used by the current display page, acquiring a target system level language package corresponding to the target language type, and loading the target system level language package.
S403: and acquiring a first module-level language packet corresponding to a first page module to which the current display page belongs, and loading the first module-level language packet so as to switch the language type used by the current display page into the target language type.
S401 to S403 are similar to S201 to S203 in the embodiment of fig. 2, and will not be described here again.
S404: when the current display page is switched to the first page, judging whether the page module to which the first page belongs is the first page module or not.
In this embodiment, when switching a page, for example, when switching a current display page to a first page, it is determined whether a page module to which the first page belongs is a first page module, if the page module to which the first page belongs is the first page module, the current display page and the first page belong to the first page module together, and since a first module level language package corresponding to the first page module is already loaded, when switching the first page, the first module level language package does not need to be loaded again, and when the terminal displays the first page, the language type used by the first page is the target language type, that is, the language type of the content displayed by the first page is the target language type.
When judging whether the page module to which the first page belongs is the first page module, determining the page module to which the first page belongs according to the attribute information of the first page, so that whether the page module is the first page module or not comprises the following specific processes: acquiring attribute information of a first page, wherein the attribute information comprises a module identifier, the module identifier is an identifier of a page module to which the first page belongs, judging whether the module identifier of the first page is identical to the identifier of the first page module, if the module identifier of the first page is identical to the identifier of the first page module, determining that the page module to which the first page belongs is the first page module, and if the module identifier of the first page is different from the identifier of the first page module, determining that the page module to which the first page belongs is not the first page module.
In order to avoid the error switching of the languages, when the current display page is switched to the first page, whether the type of the language used by the current display page is changed or not can be determined, and the specific process is as follows: and judging whether the type of the language used by the current display page changes. If the language type used by the current display page is determined to be changed, judging whether the page module to which the first page belongs is the first page module or not.
In this embodiment, it is determined whether the language type used by the current display page changes, i.e. whether the language type is switched from one language type to another, and when it is determined that the language type used by the current display page changes, i.e. when it is determined that the language type used by the current display page is switched, it is indicated that the language type used by the first page needs to be switched, then it is determined whether the page module to which the first page belongs is the first page module. When the language type used by the current display page is not changed, namely, the language type used by the current display page is not switched, the language type used by the first page does not need to be switched, and therefore whether the page module to which the first page belongs is the first page module or not does not need to be judged.
S405: if the language type is not the first page module, a second module level language package corresponding to the page module to which the first page belongs is obtained, and the second module level language package is loaded, so that the language type used by the first page is switched to the target language type.
In this embodiment, when it is determined that the page module to which the first page belongs is not the first page module, the first page is indicated to be a page in other page modules, when the current display page is switched to the first page module, a second module level language package corresponding to the page module to which the first page belongs needs to be loaded, and after the second module level language package is loaded, the language type of the content displayed on the first page is the target language type.
The second module level language package corresponding to the page module to which the first page belongs is actually the second module level language package of the target language type corresponding to the page module to which the first page belongs.
When the page module to which the first page belongs is determined not to be the first page module, the corresponding second module level language package is acquired, the first page switching can be performed by a user after the terminal is started, when the page switching is not performed for the first time, in order to avoid the repeated loading of the module level language package, the identification of the loaded page module of the module level language package corresponding to the target language type can also be recorded, when the page module to which the first page belongs is determined not to be the first page module, whether the page module to which the first page belongs is in the identification of the loaded page module is judged again, if the identification of the loaded page module indicates that the module level language package corresponding to the page module to which the first page belongs is loaded before the first page is loaded, the repeated loading is not needed again, the additional waste of resources is avoided, the time required by the page switching is shortened, and the experience of the user is improved.
Optionally, in order to avoid the repeated loading of the module-level language package, when the current display page is switched to the first page, whether the page identifier of the page module to which the first page belongs is in the identifier of the loaded page module may be directly determined, so as to determine whether the module-level language package corresponding to the page module to which the first page belongs is loaded, thereby determining whether the second module-level language package corresponding to the page module to which the first page belongs is loaded.
In this embodiment, when the current display page is switched to the first page, it is first determined whether a module level language package corresponding to a page module to which the first page belongs is loaded, if the module level language package is not loaded, the module level language package is loaded, after loading is completed, the language type used by the first page is switched to the target language type, so as to implement the switching of the page, if the module level language package is loaded, the module level language package is not required to be repeatedly loaded, the first page is directly displayed, so as to implement the switching of the page, and the repeated loading of the language package is avoided.
Fig. 5 is a schematic structural diagram of a language switching device according to an embodiment of the present invention, as shown in fig. 5, a language switching device 500 according to the present embodiment may include: an instruction receiving module 501, a system level language package loading module 502, and a module level language package loading module 503.
The instruction receiving module is used for acquiring the target language type in the language switching instruction when the language switching instruction is received.
And the system-level language package loading module is used for acquiring a target system-level language package corresponding to the target language type and loading the target system-level language package if the target language type is not the language type used by the current display page.
The module-level language package loading module is used for acquiring a first module-level language package corresponding to a first page module to which the current display page belongs and loading the first module-level language package so as to switch the language type used by the current display page into the target language type.
In one possible design, the apparatus further includes a page switch module.
And the page switching module is used for judging whether the page module to which the first page belongs is the first page module or not when the current display page is switched to the first page after the first module-level language packet is loaded.
If the language type is not the first page module, a second module level language package corresponding to the page module to which the first page belongs is obtained, and the second module level language package is loaded, so that the language type used by the first page is switched to the target language type.
In one possible design, the page switch module is specifically configured to:
and judging whether the type of the language used by the current display page changes.
If the language type used by the current display page is determined to be changed, judging whether the page module to which the first page belongs is the first page module or not.
In one possible design, the target system level language package includes a target first system level language package and a target second system level language package.
In one possible design, the instruction receiving module is further configured to: and when a starting instruction is received before the target language type in the language switching instruction is acquired when the language switching instruction is received, starting initialization processing is carried out.
And in the process of starting up initialization, acquiring a first system level language package corresponding to the initial language type, and loading the first system level language package.
When entering an initial display page, acquiring an initial module level language package corresponding to a page module to which the initial page belongs, and loading the initial module level language package so that the language type used by the initial page is the initial language type.
After the startup initialization is finished, a second system level language package corresponding to the initial language type is obtained, and the second system level language package is loaded.
In one possible design, the instruction receiving module is further configured to: before the target language type in the language switching instruction is obtained when the language switching instruction is received, a language package corresponding to each usable language type is obtained, wherein the language package comprises a plurality of language resource files.
And classifying the language resource files included in each language package aiming at each language package to obtain a system-level language package corresponding to the language type and a module-level language package corresponding to each preset page module.
The tumor image segmentation device provided by the embodiment of the invention can realize the method of the embodiment, and the implementation principle and the technical effect are similar, and are not repeated here.
Fig. 6 is a schematic hardware structure of a terminal device according to an embodiment of the present invention. As shown in fig. 6, the terminal device 600 provided in this embodiment includes: at least one processor 601 and a memory 602. The processor 601 and the memory 602 are connected by a bus 603.
In a specific implementation, at least one processor 601 executes computer-executable instructions stored in a memory 602, so that at least one processor 601 performs the language switching method in the above method embodiment.
The specific implementation process of the processor 601 may refer to the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In the embodiment shown in fig. 6, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise high speed RAM memory or may further comprise non-volatile storage NVM, such as at least one disk memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or to one type of bus.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, the language switching method of the method embodiment is realized.
The computer readable storage medium described above 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. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). The processor and the readable storage medium may reside as discrete components in a device.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (9)

1. A method for switching languages, comprising:
when a language switching instruction is received, acquiring a target language type in the language switching instruction;
If the target language type is not the language type used by the current display page, acquiring a target system level language package corresponding to the target language type, and loading the target system level language package;
acquiring a first module level language package corresponding to a first page module to which a current display page belongs, and loading the first module level language package so as to switch the language type used by the current display page into the target language type;
before the target language type in the language switching instruction is obtained when the language switching instruction is received, the method further comprises the following steps:
when a starting instruction is received, starting initialization processing is carried out;
in the process of starting up initialization, a first system level language package corresponding to an initial language type is obtained, and the first system level language package is loaded;
when entering an initial display page, acquiring an initial module level language package corresponding to a page module to which the initial page belongs, and loading the initial module level language package so that the language type used by the initial page is the initial language type;
after the startup initialization is finished, a second system level language package corresponding to the initial language type is obtained, and the second system level language package is loaded.
2. The method of claim 1, further comprising, after said loading said first module level language pack:
when a current display page is switched to a first page, judging whether a page module to which the first page belongs is the first page module or not;
if the language type is not the first page module, a second module level language package corresponding to the page module to which the first page belongs is obtained, and the second module level language package is loaded, so that the language type used by the first page is switched to the target language type.
3. The method of claim 2, wherein the determining whether the page module to which the first page belongs is the first page module comprises:
judging whether the language type used by the current display page changes or not;
if the language type used by the current display page is determined to be changed, judging whether the page module to which the first page belongs is the first page module or not.
4. The method of claim 1, wherein the target system level language package comprises a target first system level language package and a target second system level language package.
5. The method of claim 1, further comprising, prior to said obtaining a target language type in said language switching instruction upon receipt of said language switching instruction:
acquiring a language package corresponding to each usable language type, wherein the language package comprises a plurality of language resource files;
and classifying the language resource files included in each language package aiming at each language package to obtain a system-level language package corresponding to the language type and a module-level language package corresponding to each preset page module.
6. A language switching device, comprising:
the instruction receiving module is used for acquiring a target language type in the language switching instruction when the language switching instruction is received;
the system level language package loading module is used for acquiring a target system level language package corresponding to the target language type and loading the target system level language package if the target language type is not the language type used by the current display page;
the module-level language package loading module is used for acquiring a first module-level language package corresponding to a first page module to which a current display page belongs and loading the first module-level language package so as to switch the language type used by the current display page into the target language type;
The instruction receiving module is further configured to: before the target language type in the language switching instruction is obtained when the language switching instruction is received, starting initialization processing is carried out when a starting instruction is received;
in the process of starting up initialization, a first system level language package corresponding to an initial language type is obtained, and the first system level language package is loaded;
when entering an initial display page, acquiring an initial module level language package corresponding to a page module to which the initial page belongs, and loading the initial module level language package so that the language type used by the initial page is the initial language type;
after the startup initialization is finished, a second system level language package corresponding to the initial language type is obtained, and the second system level language package is loaded.
7. The apparatus of claim 6, further comprising a page switch module;
the page switching module is used for judging whether the page module to which the first page belongs is the first page module or not when the current display page is switched to the first page after the first module-level language packet is loaded;
If the language type is not the first page module, a second module level language package corresponding to the page module to which the first page belongs is obtained, and the second module level language package is loaded, so that the language type used by the first page is switched to the target language type.
8. A terminal device, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the language switching method of any one of claims 1 to 5.
9. A computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement the language switching method of any one of claims 1 to 5.
CN201911035690.3A 2019-10-29 2019-10-29 Language switching method and device and terminal equipment Active CN110795192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911035690.3A CN110795192B (en) 2019-10-29 2019-10-29 Language switching method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911035690.3A CN110795192B (en) 2019-10-29 2019-10-29 Language switching method and device and terminal equipment

Publications (2)

Publication Number Publication Date
CN110795192A CN110795192A (en) 2020-02-14
CN110795192B true CN110795192B (en) 2023-08-25

Family

ID=69441729

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911035690.3A Active CN110795192B (en) 2019-10-29 2019-10-29 Language switching method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN110795192B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111427641A (en) * 2020-02-27 2020-07-17 深圳壹账通智能科技有限公司 Multi-language adaptation method, device, system, computer equipment and storage medium
CN111399728B (en) * 2020-03-04 2023-05-26 维沃移动通信有限公司 Setting method, electronic device and storage medium
CN111767104B (en) * 2020-05-07 2023-09-01 北京奇艺世纪科技有限公司 Language type switching method and device, computer equipment and storage medium
CN112165654A (en) * 2020-08-05 2021-01-01 深圳市华曦达科技股份有限公司 Channel language switching method and device, computer equipment and storage medium
CN112667938A (en) * 2020-12-31 2021-04-16 银盛通信有限公司 Method for realizing multi-language switching of page based on PHP
CN113360061B (en) * 2021-05-25 2024-06-14 众言科技股份有限公司 Language switching method and device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624875A (en) * 2012-02-22 2012-08-01 深圳市共进电子股份有限公司 Method for replacing or updating language packs of terminal equipment
CN104462074A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Method and device for conducting webpage data translation and browser client side
CN104714982A (en) * 2013-12-17 2015-06-17 阿里巴巴集团控股有限公司 Method and system for loading webpage
CN104951364A (en) * 2014-03-31 2015-09-30 Tcl集团股份有限公司 Android platform based language switching method and system
CN105094905A (en) * 2015-07-21 2015-11-25 北京金山安全软件有限公司 Method and device for dynamically loading language resources
CN108021423A (en) * 2017-12-15 2018-05-11 语联网(武汉)信息技术有限公司 A kind of Multilingual website generating method, system and computer-readable recording medium
CN108984260A (en) * 2018-07-11 2018-12-11 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN109446796A (en) * 2018-09-19 2019-03-08 北京达佳互联信息技术有限公司 Application control method and device, mobile terminal and storage medium
CN109901886A (en) * 2019-01-23 2019-06-18 北京达佳互联信息技术有限公司 Page language switching method, system, device and computer readable storage medium
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7822434B2 (en) * 2006-05-09 2010-10-26 Research In Motion Limited Handheld electronic device including automatic selection of input language, and associated method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624875A (en) * 2012-02-22 2012-08-01 深圳市共进电子股份有限公司 Method for replacing or updating language packs of terminal equipment
CN104714982A (en) * 2013-12-17 2015-06-17 阿里巴巴集团控股有限公司 Method and system for loading webpage
CN104951364A (en) * 2014-03-31 2015-09-30 Tcl集团股份有限公司 Android platform based language switching method and system
CN104462074A (en) * 2014-12-26 2015-03-25 北京奇虎科技有限公司 Method and device for conducting webpage data translation and browser client side
CN105094905A (en) * 2015-07-21 2015-11-25 北京金山安全软件有限公司 Method and device for dynamically loading language resources
CN108021423A (en) * 2017-12-15 2018-05-11 语联网(武汉)信息技术有限公司 A kind of Multilingual website generating method, system and computer-readable recording medium
CN108984260A (en) * 2018-07-11 2018-12-11 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN109446796A (en) * 2018-09-19 2019-03-08 北京达佳互联信息技术有限公司 Application control method and device, mobile terminal and storage medium
CN109901886A (en) * 2019-01-23 2019-06-18 北京达佳互联信息技术有限公司 Page language switching method, system, device and computer readable storage medium
CN110362370A (en) * 2019-06-14 2019-10-22 平安科技(深圳)有限公司 A kind of switching method of homepages language, device and terminal device

Also Published As

Publication number Publication date
CN110795192A (en) 2020-02-14

Similar Documents

Publication Publication Date Title
CN110795192B (en) Language switching method and device and terminal equipment
US11868785B2 (en) Application program page processing method and device
CN107832100B (en) APK plug-in loading method and terminal thereof
CN110086877B (en) Application program sharing and information sharing display method, device, equipment and medium
CN106648685B (en) Intelligent terminal system application processing method and device and intelligent terminal
CN109587252A (en) Loading method, device, electronic equipment and the storage medium of operator parameter
CN112181554B (en) Interactive interface display method, device, electronic device and storage medium
US20180364999A1 (en) Method and Device for Identifying File
CN109408355B (en) Test case obtaining method and device
CN110222288B (en) Page display method, device and storage medium
CN112925718B (en) Call stack backtracking method, device, equipment and medium
CN111881393A (en) Page rendering method, device, medium and electronic equipment
CN111240788A (en) Method, device and equipment for generating small program page
CN107908679B (en) Script statement conversion method and device and computer readable storage medium
CN111290773B (en) System upgrade method, device and readable storage medium
CN111694585A (en) Method, system, terminal and storage medium for replacing system partition file
CN111857712A (en) Form processing method, device, terminal and medium
CN111045698A (en) Redundant picture deleting method and device, electronic equipment and storage medium
EP3352048A1 (en) Mobile terminal and working method thereof
CN107885543B (en) Function management method and device of application program and intelligent terminal
CN112182446B (en) Page display method and device, terminal equipment and computer readable storage medium
CN106470351B (en) Page display method and page display device
CN111538667A (en) Page testing method and device
US11012372B2 (en) Electronic apparatus and method for control thereof
CN108111905B (en) Channel list display method, smart television and computer readable storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20221019

Address after: 83 Intekte Street, Devon, Netherlands

Applicant after: VIDAA (Netherlands) International Holdings Ltd.

Address before: 266061 room 131, 248 Hong Kong East Road, Laoshan District, Qingdao City, Shandong Province

Applicant before: QINGDAO HISENSE MEDIA NETWORKS Ltd.

GR01 Patent grant
GR01 Patent grant