CN114579235A - Icon display method, device and equipment based on language type and storage medium - Google Patents
Icon display method, device and equipment based on language type and storage medium Download PDFInfo
- Publication number
- CN114579235A CN114579235A CN202210173988.6A CN202210173988A CN114579235A CN 114579235 A CN114579235 A CN 114579235A CN 202210173988 A CN202210173988 A CN 202210173988A CN 114579235 A CN114579235 A CN 114579235A
- Authority
- CN
- China
- Prior art keywords
- icon
- language
- pictures
- font file
- language type
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000013507 mapping Methods 0.000 claims description 18
- 230000002452 interceptive effect Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 13
- 230000000694 effects Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 3
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
- G06F9/454—Multi-language systems; Localisation; Internationalisation
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the application provides an icon display method, device and equipment based on language types and a storage medium. According to the technical scheme, the icon number corresponding to the icon identifier in the font file is determined according to the language type used by the application program under the current language type, the icon picture corresponding to the icon number is loaded and displayed from the font file according to the determined icon number, the icon identifier corresponding to the icon identifier and the icon picture corresponding to different language types are mapped through the icon number, the icon number corresponding to the icon identifier can be automatically adapted according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed, the icon picture is not required to be replaced by developers aiming at various language types, the replacement of different icon pictures of the same icon identifier under different language types is realized, the program development efficiency is effectively improved, the error probability of icon picture replacement is reduced, and the user experience is ensured.
Description
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an icon display method, device and equipment based on language types and a storage medium.
Background
In an interactive interface of an application program, an icon picture is often used as a mark, so that a user can conveniently perform corresponding operation or know the working state of the application program based on the icon picture, for example, the icon picture corresponding to a return arrow is displayed in the interactive interface, and the user can return to the previous-level interactive interface after clicking the icon picture.
Because the arrangement modes of different languages are different, for example, chinese, english, etc. are arranged from left to right, and arabic, etc. are arranged from right to left, different icon pictures are usually required to represent the same semantics for the languages with different arrangement modes. At present, icon pictures of different language types are generally replaced by a manual replacement mode of developers, the workload of manual replacement is large, and the icon pictures are easily replaced by wrong icon pictures to influence the user experience.
Disclosure of Invention
The embodiment of the application provides an icon display method, an icon display device, an icon display equipment and a storage medium based on language types, so that the technical problems that in the prior art, manual replacement of icon pictures is large in workload, wrong icon pictures are easily replaced, and user experience is affected are solved, the program development efficiency is effectively improved, the error probability of icon picture replacement is reduced, and the user experience is guaranteed.
In a first aspect, an embodiment of the present application provides an icon display method based on a language type, including:
determining a language type used by the application program;
determining the icon number corresponding to the icon identifier in a font file according to the language type, wherein the font file records a plurality of icon pictures and the icon numbers corresponding to the icon pictures, and different icon pictures are configured according to the corresponding language type;
and loading and displaying the icon picture from the font file according to the icon number.
In a second aspect, an embodiment of the present application provides an icon display apparatus based on a language type, including a language determination module, a number determination module, and an icon display module, where:
the language determination module is used for determining the language type used by the application program;
the number determining module is used for determining the icon number corresponding to the icon identifier in a font file according to the language type, the font file records a plurality of icon pictures and the icon numbers corresponding to the icon pictures, and different icon pictures are configured according to the corresponding language type;
and the icon display module is used for loading and displaying the icon picture from the font file according to the icon number.
In a third aspect, an embodiment of the present application provides an icon display device based on a language type, including: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the language-type based icon display method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium storing computer-executable instructions for performing the language-type based icon display method according to the first aspect when executed by a computer processor.
According to the method and the device, the icon number corresponding to the icon identifier in the font file is determined according to the language type used by the application program under the current language type, the icon picture corresponding to the icon number is loaded and displayed from the font file according to the determined icon number, the icon identifier corresponding to the icon identifier and the icon picture corresponding to different language types are mapped through the icon number, the icon number corresponding to the icon identifier can be automatically adapted according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed, replacement of different icon pictures of the same icon identifier under different language types is achieved without replacing the icon pictures with respect to various language types by developers, program development efficiency is effectively improved, error probability of icon picture replacement is reduced, and user experience is guaranteed.
Drawings
Fig. 1 is a flowchart of a method for displaying an icon based on a language type according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a display effect of characters in different language types according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating a display effect of a first icon picture provided in an embodiment of the present application;
fig. 4 is a schematic view illustrating a display effect of a second icon picture provided in an embodiment of the present application;
fig. 5 is a schematic diagram illustrating a display effect of a third icon picture provided in the embodiment of the present application;
FIG. 6 is a flowchart of a second language-type-based icon display method according to an embodiment of the present application;
FIG. 7 is a flowchart of a third method for displaying icons based on language type according to an embodiment of the present application;
FIG. 8 is a schematic structural diagram of an icon display device based on language type according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an icon display device based on language type according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The above process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes described above may correspond to methods, functions, procedures, subroutines, and the like.
Fig. 1 is a flowchart illustrating a language-type-based icon display method according to an embodiment of the present disclosure, which may be implemented by a language-type-based icon display apparatus, which may be implemented in hardware and/or software and integrated in a language-type-based icon display device (e.g., a mobile phone, a tablet, a web front end, etc.).
The following description will be given taking as an example a method in which the icon display apparatus based on the language type performs the icon display based on the language type. Referring to fig. 1, the language-type-based icon display method includes:
s101: the type of language used by the application is determined.
The language type may be chinese, english, arabic, etc. (which may be determined according to the requirement of the use area), and there are different arrangement modes of different language types (for example, arrangement modes from left to right, from right to left, from top to bottom, etc.), when loading and displaying characters on the interactive interface, characters of corresponding types may be loaded according to the used language type and displayed at the corresponding position of the interactive interface.
As shown in the schematic diagram of the display effect of the characters in different language types provided in fig. 2, taking "setting" in chinese as an example, A, B, C three display boxes in the diagram respectively show the display effect of the characters corresponding to "setting" in chinese, english and arabic, the characters of the three display boxes all express the same semantic meaning, but the arrangement modes of the characters are different, wherein the arrangement modes of the chinese and english are all from left to right, and the arrangement mode of the characters in arabic is from right to left.
It can be understood that, due to the different arrangement language types, the display habits of the icon pictures are different, and although the same semantics are expressed, the icon pictures under the different arrangement language types also need to be adaptively changed, for example, for chinese and english, the display habits of the return arrow are from right to left, and for arabic, the display habits of the return arrow are from left to right. When the application program is started, the corresponding icon picture can be selected to be displayed according to the language type used by the application program, and the expression accuracy of the icon picture with the same semantic meaning under different language types is improved. In one embodiment, when the used language type is switched among Chinese, English and Arabic, the corresponding icon picture can be selected for replacement display according to the switched language type, and adaptive replacement of the icon picture among different language types is realized.
The language type used by the application program is determined according to the language type used by the system and/or the language type set by the application program, namely, the language type used by the application program can be determined based on the system language used by the icon display device and/or based on the language type set by the application program. For example, when the application program is started for the first time, the system language may be determined as the language type used by the application program, and if the user executes the language type in the application program during the use of the application program, the specified language type may be determined as the language type used by the application program, or the language type specified by the application program may be determined as the language type used by the application program if the language type is specified inside the application program.
S102: and determining the icon number corresponding to the icon identifier in the font file according to the language type, wherein the font file records a plurality of icon pictures and the icon numbers corresponding to the icon pictures, and different icon pictures are configured according to the corresponding language type.
In this embodiment, corresponding icon pictures are set in advance according to display requirements or display habits of different language types on the icons, wherein one semantic icon may be configured with one icon picture or a plurality of icon pictures. For example, when the display requirements or display habits of one semantic in various language types are the same, the icon of the semantic can be configured with only one icon picture, and when the display requirements or display habits of one semantic in various language types are different, the icon of the semantic can be configured with a plurality of icon pictures according to different display requirements or display habits, and a plurality of language types with the same display requirements or display habits correspond to the same icon picture. The content displayed by the icon picture can be a symbol, a character or a combination of the two.
Optionally, the icon pictures may be recorded in the form of a vector diagram, and may be obtained by performing vector diagram conversion on scalar quantity pictures corresponding to each icon picture, or by performing vector diagram production according to display requirements or display habits of the icon. And simultaneously, setting a corresponding icon number for each icon picture, wherein the icon pictures and the icon numbers corresponding to the icon pictures are recorded in a font file, and optionally, the icon pictures recorded in the font file are vector images.
The icon identifier is used for indicating the type of the icon picture which is required to be displayed by the application program at the designated position, and under different language types, different icon identifiers and the icon number in the font file have a preset mapping relation. According to the scheme, one type of icon picture is expressed through one icon identification, namely, the icon pictures of multiple language types are expressed through one icon identification, so that the code complexity of selecting the icon pictures according to different language types during program development is effectively reduced, the program development process is simplified, the program robustness and the development efficiency are improved, and the program maintenance cost is saved.
Illustratively, after determining the language type used by the application program, the icon number corresponding to the icon identifier in the font file is further determined according to the language type. The icon pictures corresponding to different language types and the corresponding icon numbers can be recorded in the same font file, namely only one font file is set, and the icon identification under one semantic meaning can correspond to the icon numbers of multiple language types in the font file. The method can also be characterized in that a font file corresponding to the language type is set, icon pictures and icon numbers under the same language type are recorded in the font file corresponding to the language type, namely a plurality of font files are set, and an icon mark under semantic meaning corresponds to the icon number of one language type in the font file. For the case of only setting one font file, each icon picture corresponds to different icon numbers (the icon pictures with the same semantic meaning also correspond to different icon numbers), the icon numbers under a plurality of language types associated with the current icon identification are searched, and the icon numbers are determined according to the used language types. For the case that a plurality of font files are arranged, the corresponding font file can be selected according to the used language type, and when the displayed icon picture needs to be determined subsequently, the icon number associated with the current icon identification is directly determined in the determined font file.
S103: and loading and displaying the icon picture from the font file according to the icon number.
Illustratively, after the icon number is determined, the icon picture corresponding to the icon number is loaded from the font file, and the obtained icon picture is displayed at the designated position of the interactive interface. The designated position of the interactive interface can be a fixed position or a position dynamically determined according to the language type. For example, for return arrows in chinese and english, the display position is generally the left position in the interactive interface, while in arabic the return arrow is generally disposed at the right position in the interactive interface.
Fig. 3 is a schematic view of a display effect of a first icon picture provided in an embodiment of the present application, and as shown in fig. 3, it is assumed that a language type used by a current application program is chinese, a currently displayed interactive interface is a setting interface of the application program, where characters on a title of the interface are arranged from left to right. After the application program is opened, the currently used language type is determined to be Chinese. The application needs to display a return arrow on the interactive interface to represent the return button icon, and the application refers to the icon picture by the icon identification semantically indicated as the return arrow icon. When an application program enters a set interface, calling corresponding Chinese characters in a Chinese font file and displaying the Chinese characters on an interface title, determining the icon numbers corresponding to the icon identifications in the font file according to the mapping relation between the icon identifications and the icon numbers in the language type corresponding to Chinese, acquiring icon pictures according to the determined icon numbers and displaying the icon pictures to the position where the return button icons need to be displayed, wherein the return button icons displayed in the figure 3 are arrows pointing to the left side in the upper left corner of the interactive interface.
Fig. 4 is a schematic diagram of a display effect of a second icon picture provided in an embodiment of the present application, and as shown in fig. 4, it is assumed that a language type used by a current application program is english, a currently displayed interactive interface is a setting interface of the application program, which is similar to chinese, and an arrangement manner of characters on an interface title is from left to right. After the application is opened, the currently used language type is determined to be english. When an application program enters a setting interface, calling corresponding English characters in an English font file and displaying the English characters on an interface title, determining the icon numbers corresponding to the icon identifications in the font file according to the mapping relation between the icon identifications and the icon numbers under the language type corresponding to English, acquiring icon pictures according to the determined icon numbers, displaying the icon pictures to the positions where the return button icons need to be displayed, and displaying the icon pictures to be consistent with Chinese, wherein the return button icons displayed in the graph 4 are arrows pointing to the left side in the upper left corner of the interactive interface. Therefore, when the language types with the same arrangement sequence are switched, the representation forms of the icon pictures with the same semantics are kept consistent, and the reading habits of the corresponding language types are better met.
Fig. 5 is a schematic view illustrating a display effect of a third icon picture provided in the embodiment of the present application, and as shown in fig. 5, it is assumed that a language type used by a current application program is arabic, a currently displayed interactive interface is a setting interface of the application program, and an arrangement manner of characters on a title of the interface is from right to left. After the application program is opened, the type of the language currently used is determined to be Arabic. When an application program enters a setting interface, calling corresponding Arabic characters in an Arabic font file and displaying the Arabic characters on an interface title, determining the icon numbers corresponding to the icon identifications in the font file according to the mapping relation between the icon identifications and the icon numbers under the language type corresponding to the Arabic, acquiring icon pictures according to the determined icon numbers, and displaying the icon pictures at the positions where the return button icons need to be displayed, wherein the positions are opposite to Chinese and English, and the return button icons displayed in the graph 5 are arrows pointing to the right side in the upper right corner of the interactive interface. Therefore, when the language types with different arrangement sequences are switched, the representation forms of the icon pictures with the same semantic meanings are also adaptively changed, and the reading habits of the corresponding language types are better met.
According to the method, the icon number corresponding to the icon identifier in the font file is determined according to the language type used by the application program under the current language type, the icon picture corresponding to the icon number is loaded and displayed from the font file according to the determined icon number, the corresponding icon identifier and the icon pictures corresponding to different language types are mapped through the icon number, the icon number corresponding to the icon identifier can be automatically adapted according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed, developers do not need to replace the icon pictures aiming at various language types, the replacement of the same icon identifier and different icon pictures under different language types is realized, the program development efficiency is effectively improved, the error probability of icon picture replacement is reduced, and the user experience is ensured.
On the basis of the foregoing embodiment, fig. 6 is a flowchart of a second language-type-based icon display method provided in an embodiment of the present application, which is a concrete implementation of the language-type-based icon display method. Referring to fig. 6, the language-type-based icon display method includes:
s201: the type of language used by the application is determined.
S202: and selecting the font file according to the language type, and determining the icon number corresponding to the icon identifier in the selected font file.
In this embodiment, different font files correspond to different language types, and the font files record a plurality of icon pictures corresponding to the language types and icon numbers corresponding to the icon pictures, where the different icon pictures are configured according to the corresponding language types. The method is characterized in that a font file is set for each language type, corresponding icon pictures are stored in each font file for each semantic icon identifier in each font file, the icon pictures corresponding to the same semantic are provided with the same icon number, and the icon pictures corresponding to the same semantic in each language type can be represented by one icon number.
Optionally, the mapping relationship between the icon identifier and the icon number may be one-to-one corresponding to an enumeration statement set in the application program and including icon meanings, different icon pictures may be loaded through the same icon identifier to achieve an effect of displaying different icons, and an enumeration statement corresponding to one icon identifier may be used to automatically select an icon picture to be displayed according to different language types.
For example, after the language type used by the application program is determined, the font file corresponding to the language type is determined, and then the icon number can be determined based on the font file, without determining the font file and the mapped icon number according to the language type. When the icon picture needs to be loaded and displayed, the icon number corresponding to the icon identification is determined based on the preset mapping relation between the icon identification and the icon number.
In a possible embodiment, a font file of a default language type may be configured in the application program, and when the program starts or detects that a language change operation determines that an unsaved font file is determined, the font file corresponding to the changed language type may be pulled from the server, so as to implement automatic icon change of more language types.
S203: and loading and displaying the icon picture from the font file according to the icon number.
For example, after the icon number is determined, the icon picture corresponding to the icon number is loaded in the determined font file based on the determined icon number, and the obtained icon picture is displayed at the designated position of the interactive interface.
It can be understood that in different font files, icon pictures with the same semantics correspond to the same icon number, and the same icon number may represent the icon pictures in different language types, so after the language type is determined, subsequent determination of the icon number and the loading process of the icon picture are performed based on the font file corresponding to the language type, the requirement on the development amount of the application program is low, and the execution efficiency is higher.
Taking fig. 3 and 5 as an example, it is assumed that 3 font files corresponding to chinese, english, and arabic are set in the icon display device based on the language type, the language type used by the application program at the beginning is chinese, the language type is determined to be chinese when the application program is started, and the font file used is determined to be a font file corresponding to chinese. When an application program enters a setting interface, the icon number corresponding to the icon identifier is determined according to the mapping relation between the icon identifier and the icon number, an icon picture is obtained in a font file corresponding to Chinese according to the determined icon number, and the icon picture is displayed to the position where a return button icon needs to be displayed (see fig. 3).
If the language type is switched to arabic in the application program by the user, the font file used at this time is switched to the font file corresponding to arabic, when the application program enters the setting interface, the icon number corresponding to the icon identifier is determined according to the mapping relationship between the icon identifier and the icon number (the icon number is the same as the icon number determined when the chinese language is used), and the icon picture is obtained in the font file corresponding to arabic according to the determined icon number and is displayed to the position where the return button icon needs to be displayed (see fig. 5). The icon pictures pointing to the left side in fig. 3 and the icon pictures pointing to the right side in fig. 5 both show that corresponding semantics are returned, although the two icon pictures are different in expression form, they are stored in two different font files, and the corresponding icon identifications can be mapped to the icon numbers by using the same icon numbers, that is, the icon pictures of different language types can be represented by one icon identification, thereby reducing the workload of program development.
According to the method, the icon number corresponding to the icon identifier in the font file under the current language type is determined according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed from the font file according to the determined icon number, the icon identifier corresponding to the icon identifier and the icon pictures corresponding to different language types are mapped through the icon number, the icon number corresponding to the icon identifier can be automatically adapted according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed, developers do not need to replace the icon pictures aiming at various language types, the replacement of different icon pictures of the same icon identifier under different language types is realized, the program development efficiency is effectively improved, the error probability of the replacement of the icon pictures is reduced, and the user experience is ensured. Meanwhile, a corresponding font file is set for each language type, and icon pictures corresponding to the same semantic icon in different language types are represented by the same icon number, so that the development requirement on application programs is reduced, and the determination efficiency of the icon pictures is effectively improved.
On the basis of the foregoing embodiment, fig. 7 is a flowchart of a third language-type-based icon displaying method provided in an embodiment of the present application, which is a concrete implementation of the language-type-based icon displaying method. Referring to fig. 7, the language type-based icon display method includes:
s301: the type of language used by the application is determined.
S302: and determining the icon number corresponding to the icon identifier in the font file based on the mapping relation between different icon identifiers and the icon number under the language type.
In this embodiment, the font file records a plurality of icon pictures corresponding to a plurality of language types and icon numbers corresponding to the icon pictures, that is, the icon pictures corresponding to all the language types and the icon numbers corresponding to each icon picture are recorded in a single font file, and different icon pictures are configured according to the corresponding language types. The icon pictures in different expression forms correspond to different icon numbers, and because the icon pictures are all stored in one font file, even if the different icon pictures correspond to the same semantic meaning, the corresponding icon numbers are also the same. Correspondingly, a preset mapping relation exists between one icon identifier and icon numbers corresponding to a plurality of different language types under the same semantic meaning.
In one embodiment, for different language types, if the corresponding language arrangement directions are consistent, the icons with the same semantic meaning can be displayed through the same icon picture, that is, different language types with the same semantic meaning and the same language arrangement direction can point to the same icon picture, so that the data storage amount of the repeated icon pictures can be reduced.
In an embodiment, a mapping relationship between the icon identifier and the icon number may be set according to different language types (for example, mapping is performed in a manner of function, dictionary, or enumeration), and when an icon picture corresponding to the icon identifier needs to be loaded and displayed, the icon number corresponding to the icon identifier in the font file is determined according to the mapping relationship between the icon identifier and the icon number in the currently used language type.
S303: and loading and displaying the icon picture from the font file according to the icon number.
For example, after the icon number is determined, the icon picture corresponding to the icon number is loaded in the determined font file based on the determined icon number, and the obtained icon picture is displayed at the designated position of the interactive interface. It can be understood that according to the scheme, the icon pictures and the icon numbers corresponding to the language types are recorded through the single font file, and the occupation of the font file on the storage space is reduced.
Taking fig. 3 to 5 as an example, it is assumed that different icon identifications and icon numbers corresponding to the icon identifications are recorded by a single font file in the icon display device based on the language type, and mapping relationships between the icon identifications and the icon numbers are configured for chinese, english, and arabic, respectively. The language type used by the application program at first is Chinese, when the application program enters a setting interface, the icon number corresponding to the icon identifier is determined according to the mapping relation between the icon identifier corresponding to the Chinese and the icon number, the icon picture is obtained in the font file according to the determined icon number, and the icon picture is displayed to the position where the return button icon needs to be displayed (see fig. 3).
If the language type is switched to arabic in the application program by the user, when the application program enters a setting interface, an icon number corresponding to the icon identifier is determined according to the mapping relation between the icon identifier corresponding to arabic and the icon number (the icon number is different from the icon number determined when Chinese is used), an icon picture is obtained in the font file according to the determined icon number, and the icon picture is displayed to the position where the return button icon needs to be displayed (see fig. 5).
If the language type is switched to english in the application program by the user, when the application program enters the setting interface, the icon number corresponding to the icon identifier is determined according to the mapping relation between the icon identifier corresponding to english and the icon number (the icon number is the same as the icon number determined when chinese is used), and the icon picture is obtained in the font file according to the determined icon number and is displayed to the position where the return button icon needs to be displayed (see fig. 4). When the icon pictures are in the same expression form, only one icon picture and the corresponding icon number are stored in the font file, and the occupation of the font file on the storage space is reduced.
According to the method, the icon number corresponding to the icon identifier in the font file under the current language type is determined according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed from the font file according to the determined icon number, the icon identifier corresponding to the icon identifier and the icon pictures corresponding to different language types are mapped through the icon number, the icon number corresponding to the icon identifier can be automatically adapted according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed, developers do not need to replace the icon pictures aiming at various language types, the replacement of different icon pictures of the same icon identifier under different language types is realized, the program development efficiency is effectively improved, the error probability of the replacement of the icon pictures is reduced, and the user experience is ensured. Meanwhile, the icon pictures and the icon numbers corresponding to all the language types are recorded through a single font file, and the occupation of the font file on the storage space is reduced.
Fig. 8 is a schematic structural diagram of an icon display device based on language types according to an embodiment of the present application. Referring to fig. 8, the language-type-based icon display apparatus includes a language determination module 81, a number determination module 82, and an icon display module 83.
The language determining module 81 is configured to determine a language type used by the application; a number determining module 82, configured to determine, according to the language type, an icon number corresponding to the icon identifier in a font file, where the font file records a plurality of icon pictures and icon numbers corresponding to the icon pictures, and different icon pictures are configured according to the corresponding language type; and the icon display module 83 is used for loading and displaying the icon pictures from the font file according to the icon numbers.
According to the method, the icon number corresponding to the icon identifier in the font file is determined according to the language type used by the application program under the current language type, the icon picture corresponding to the icon number is loaded and displayed from the font file according to the determined icon number, the corresponding icon identifier and the icon pictures corresponding to different language types are mapped through the icon number, the icon number corresponding to the icon identifier can be automatically adapted according to the language type used by the application program, the icon picture corresponding to the icon number is loaded and displayed, developers do not need to replace the icon pictures aiming at various language types, the replacement of the same icon identifier and different icon pictures under different language types is realized, the program development efficiency is effectively improved, the error probability of icon picture replacement is reduced, and the user experience is ensured.
The embodiment of the application also provides icon display equipment based on the language type, and the icon display equipment based on the language type can be integrated with the icon display device based on the language type provided by the embodiment of the application. Fig. 9 is a schematic structural diagram of an icon display device based on language type according to an embodiment of the present application. Referring to fig. 9, the language type-based icon display apparatus includes: an input device 93, an output device 94, a memory 92, and one or more processors 91; a memory 92 for storing one or more programs; when the one or more programs are executed by the one or more processors 91, the one or more processors 91 implement the language-type-based icon display method provided as the above-described embodiment. The language-type-based icon display device, the language-type-based icon display equipment and the language-type-based icon display computer can be used for executing the language-type-based icon display method provided by any of the above embodiments, and have corresponding functions and beneficial effects.
Embodiments of the present application also provide a storage medium storing computer-executable instructions, which when executed by a computer processor, are used to perform a language-type-based icon display method as provided in the above embodiments. Of course, the storage medium storing the computer-executable instructions provided in the embodiments of the present application is not limited to the language-based icon display method provided above, and may also perform related operations in the language-based icon display method provided in any embodiment of the present application. The language-type-based icon display apparatus, the language-type-based icon display device, the language-type-based icon display apparatus, and the storage medium provided in the above embodiments may execute the language-type-based icon display method provided in any embodiment of the present application, and reference may be made to the language-type-based icon display method provided in any embodiment of the present application without detailed technical details described in the above embodiments.
The foregoing is considered as illustrative of the preferred embodiments of the invention and the technical principles employed. The present application is not limited to the particular embodiments provided herein, and various obvious changes, adaptations and substitutions will now occur to those skilled in the art without departing from the scope of the present application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the claims.
Claims (10)
1. A method for displaying an icon based on a language type, comprising:
determining a language type used by the application program;
determining the icon number corresponding to the icon identifier in a font file according to the language type, wherein the font file records a plurality of icon pictures and the icon numbers corresponding to the icon pictures, and different icon pictures are configured according to the corresponding language type;
and loading and displaying the icon picture from the font file according to the icon number.
2. The method for displaying icons based on language type according to claim 1, wherein different font files correspond to different language types, and the font files record a plurality of icon pictures corresponding to the language types and icon numbers corresponding to the icon pictures.
3. The method for displaying icons according to claim 2, wherein determining the icon numbers corresponding to the icon identifications in the font files according to the language types comprises:
selecting a font file according to the language type, and determining the icon number corresponding to the icon identifier in the selected font file.
4. The method for displaying icons according to claim 1, wherein the font file records a plurality of icon pictures corresponding to a plurality of language types and icon numbers corresponding to the icon pictures.
5. The method for displaying icons according to claim 4, wherein determining the icon number corresponding to the icon identifier in the font file according to the language type comprises:
and determining the icon number corresponding to the icon identifier in the font file based on the mapping relation between different icon identifiers and icon numbers in the language type.
6. The icon displaying method according to claim 1, wherein the language type used by the application program is determined according to a language type used by a system and/or a language type set by the application program.
7. The method of claim 1, wherein the icon picture is a vector image.
8. A language-type-based icon display device is characterized by comprising a language determination module, a number determination module and an icon display module, wherein:
the language determination module is used for determining the language type used by the application program;
the number determining module is used for determining the icon number corresponding to the icon identifier in a font file according to the language type, the font file records a plurality of icon pictures and the icon numbers corresponding to the icon pictures, and different icon pictures are configured according to the corresponding language type;
and the icon display module is used for loading and displaying the icon picture from the font file according to the icon number.
9. A language-type-based icon display device, comprising: a memory and one or more processors;
the memory to store one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the language-type based icon displaying method of any one of claims 1-7.
10. A storage medium storing computer-executable instructions for performing the language-type based icon displaying method of any one of claims 1-7 when executed by a computer processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210173988.6A CN114579235B (en) | 2022-02-24 | 2022-02-24 | Language type-based icon display method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210173988.6A CN114579235B (en) | 2022-02-24 | 2022-02-24 | Language type-based icon display method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114579235A true CN114579235A (en) | 2022-06-03 |
CN114579235B CN114579235B (en) | 2024-04-09 |
Family
ID=81774621
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210173988.6A Active CN114579235B (en) | 2022-02-24 | 2022-02-24 | Language type-based icon display method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114579235B (en) |
Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05197685A (en) * | 1991-08-19 | 1993-08-06 | Internatl Business Mach Corp <Ibm> | System and method for supporting translation of windowed user interface with plurality of languages |
EP1423780A2 (en) * | 2001-03-27 | 2004-06-02 | Lego A/S | Method, system and storage medium for an iconic language communication tool |
KR20060078498A (en) * | 2004-12-31 | 2006-07-05 | 엘지전자 주식회사 | Multilingual management method using xml and resource package |
CN103309647A (en) * | 2012-03-08 | 2013-09-18 | 鸿富锦精密工业(深圳)有限公司 | Application program multi-language support system and method |
CN103838848A (en) * | 2014-03-08 | 2014-06-04 | 广东欧珀移动通信有限公司 | Method and device for dynamically displaying share icons according to system languages |
CN104899319A (en) * | 2015-06-18 | 2015-09-09 | 深圳市茁壮网络股份有限公司 | Webpage icon uploading method and device |
CN105808246A (en) * | 2016-03-01 | 2016-07-27 | 宇龙计算机通信科技(深圳)有限公司 | Method and device for switching names of desktop icon folders and electronic apparatus |
CN107368309A (en) * | 2017-07-07 | 2017-11-21 | 惠州Tcl移动通信有限公司 | Realize that application program supports multilingual method, storage device and mobile terminal |
CN109920032A (en) * | 2019-01-22 | 2019-06-21 | 深圳壹账通智能科技有限公司 | Method, apparatus, equipment and the storage medium of icon are generated based on font |
CN110928588A (en) * | 2019-11-19 | 2020-03-27 | 珠海格力电器股份有限公司 | Method and device for adjusting terminal configuration, mobile terminal and storage medium |
CN110990105A (en) * | 2019-12-10 | 2020-04-10 | 北京小米移动软件有限公司 | Interface display method and device, electronic equipment and storage medium |
CN111651113A (en) * | 2020-07-16 | 2020-09-11 | 广州朱雀信息科技有限公司 | Page display method, device, equipment and storage medium |
CN112328348A (en) * | 2020-11-05 | 2021-02-05 | 深圳壹账通智能科技有限公司 | Application program multi-language support method and device, computer equipment and storage medium |
CN112988297A (en) * | 2021-03-10 | 2021-06-18 | 深圳市创想三维科技有限公司 | Language switching method and device based on touch screen, electronic equipment and storage medium |
CN114003241A (en) * | 2020-07-28 | 2022-02-01 | 华为技术有限公司 | Interface adaptation display method and system of application program, electronic device and medium |
-
2022
- 2022-02-24 CN CN202210173988.6A patent/CN114579235B/en active Active
Patent Citations (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05197685A (en) * | 1991-08-19 | 1993-08-06 | Internatl Business Mach Corp <Ibm> | System and method for supporting translation of windowed user interface with plurality of languages |
EP1423780A2 (en) * | 2001-03-27 | 2004-06-02 | Lego A/S | Method, system and storage medium for an iconic language communication tool |
KR20060078498A (en) * | 2004-12-31 | 2006-07-05 | 엘지전자 주식회사 | Multilingual management method using xml and resource package |
CN103309647A (en) * | 2012-03-08 | 2013-09-18 | 鸿富锦精密工业(深圳)有限公司 | Application program multi-language support system and method |
CN103838848A (en) * | 2014-03-08 | 2014-06-04 | 广东欧珀移动通信有限公司 | Method and device for dynamically displaying share icons according to system languages |
CN104899319A (en) * | 2015-06-18 | 2015-09-09 | 深圳市茁壮网络股份有限公司 | Webpage icon uploading method and device |
CN105808246A (en) * | 2016-03-01 | 2016-07-27 | 宇龙计算机通信科技(深圳)有限公司 | Method and device for switching names of desktop icon folders and electronic apparatus |
CN107368309A (en) * | 2017-07-07 | 2017-11-21 | 惠州Tcl移动通信有限公司 | Realize that application program supports multilingual method, storage device and mobile terminal |
CN109920032A (en) * | 2019-01-22 | 2019-06-21 | 深圳壹账通智能科技有限公司 | Method, apparatus, equipment and the storage medium of icon are generated based on font |
CN110928588A (en) * | 2019-11-19 | 2020-03-27 | 珠海格力电器股份有限公司 | Method and device for adjusting terminal configuration, mobile terminal and storage medium |
CN110990105A (en) * | 2019-12-10 | 2020-04-10 | 北京小米移动软件有限公司 | Interface display method and device, electronic equipment and storage medium |
CN111651113A (en) * | 2020-07-16 | 2020-09-11 | 广州朱雀信息科技有限公司 | Page display method, device, equipment and storage medium |
CN114003241A (en) * | 2020-07-28 | 2022-02-01 | 华为技术有限公司 | Interface adaptation display method and system of application program, electronic device and medium |
CN112328348A (en) * | 2020-11-05 | 2021-02-05 | 深圳壹账通智能科技有限公司 | Application program multi-language support method and device, computer equipment and storage medium |
CN112988297A (en) * | 2021-03-10 | 2021-06-18 | 深圳市创想三维科技有限公司 | Language switching method and device based on touch screen, electronic equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
王丽娜 等: "电子文献检索图标表示方法与内涵研究", 《现代情报》, vol. 33, no. 8, 15 August 2013 (2013-08-15), pages 147 - 151 * |
白鹤;赵正旭;: "多语言用户界面的研究", 河北省科学院学报, no. 02, 15 June 2013 (2013-06-15), pages 44 - 48 * |
Also Published As
Publication number | Publication date |
---|---|
CN114579235B (en) | 2024-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6195182B2 (en) | Application scenario identification method, power consumption management method, apparatus, and terminal device | |
US9798448B2 (en) | Full-screen heterogeneous desktop display and control | |
US9507519B2 (en) | Methods and apparatus for dynamically adapting a virtual keyboard | |
US8745581B2 (en) | Method and system for selectively copying portions of a document contents in a computing system (smart copy and paste | |
KR102249054B1 (en) | Quick tasks for on-screen keyboards | |
US9069432B2 (en) | Copy and paste buffer | |
US11734028B2 (en) | Modifying readable and focusable elements on a page during execution of automated scripts | |
US20140089841A1 (en) | Device and method for providing application interface based on writing input | |
CN112579187A (en) | Optimization method and device for cold start of application program | |
EP3757739A1 (en) | Method for display when exiting an application, and terminal | |
CN107908679B (en) | Script statement conversion method and device and computer readable storage medium | |
CN112463272B (en) | Interface layout loading display method, system, electronic equipment and storage medium | |
CN113626017A (en) | Heterogeneous program analysis method and device, computer equipment and storage medium | |
WO2024002051A1 (en) | Document editing method and apparatus, and electronic device and storage medium | |
CN113407075A (en) | Icon sorting method and device and electronic equipment | |
CN114579235B (en) | Language type-based icon display method, device, equipment and storage medium | |
EP4283453A1 (en) | Content extraction method and apparatus | |
CN116049215A (en) | Method, device, electronic equipment and medium for inquiring options | |
CN108021567B (en) | Method and device for self-adaptively customizing fonts of browser | |
CN110286985B (en) | User interface display method, system and related components | |
CN113918254A (en) | Language text management method and device, storage medium and electronic equipment | |
CN114116087A (en) | Interface operation method and device between two systems, electronic equipment and medium | |
CN113821205A (en) | Method and device for controlling small program page parameters, medium and electronic equipment | |
CN108538379A (en) | The processing method of parameter and magnetic resonance parameters card interface in magnetic resonance parameters card | |
CN112764750B (en) | Interface generation method, device, electronic equipment and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |