WO2020048326A1 - 一种界面显示方法、系统及终端设备 - Google Patents

一种界面显示方法、系统及终端设备 Download PDF

Info

Publication number
WO2020048326A1
WO2020048326A1 PCT/CN2019/102296 CN2019102296W WO2020048326A1 WO 2020048326 A1 WO2020048326 A1 WO 2020048326A1 CN 2019102296 W CN2019102296 W CN 2019102296W WO 2020048326 A1 WO2020048326 A1 WO 2020048326A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
display
language
file
layout file
Prior art date
Application number
PCT/CN2019/102296
Other languages
English (en)
French (fr)
Inventor
陈晓键
Original Assignee
百富计算机技术(深圳)有限公司
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 百富计算机技术(深圳)有限公司 filed Critical 百富计算机技术(深圳)有限公司
Publication of WO2020048326A1 publication Critical patent/WO2020048326A1/zh

Links

Images

Classifications

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

Definitions

  • the invention belongs to the technical field of screen display, and particularly relates to an interface display method, system and terminal device.
  • UI is the abbreviation of User Interface, which refers to the user's operation interface, and is also called the man-machine interface.
  • Interface display applications are very wide. For example, POS devices used in payment applications commonly used in life also have display interfaces.
  • the traditional POS interface shows that the processing of multiple languages is to modify the application code for that language, which is difficult to maintain, has many code versions, and has a long development cycle.
  • the interface is different for different languages. For example, for the same display content, the display in English is different from Chinese, Arabic, or Persian. Especially for Arabic, even if the sentence width is too long, there is no line break. It requires a lot of adjustments to the display interface and a lot of development.
  • the existing interface display has problems of inconvenience in use and difficulty in maintenance and development.
  • embodiments of the present invention provide an interface display method, system, and terminal device to solve the problems that the interface display in the prior art is inconvenient to use and difficult to maintain and develop.
  • a first aspect of an embodiment of the present invention provides an interface display method, including:
  • the corresponding display interface is displayed according to the interface layout file, and the interface elements of corresponding specifications are displayed in corresponding positions according to the display controls and layout parameters, wherein the display controls and the layout parameters are pre-written in the interface layout file. ;
  • a corresponding language translation file is retrieved, and a language text corresponding to the target language is added to the display interface.
  • a second aspect of the embodiments of the present invention provides an interface display system, including:
  • Language setting module which is used to retrieve the corresponding interface layout file according to the target language selected by the user in the language setting;
  • An interface display module is configured to display a corresponding display interface according to the interface layout file, and display interface elements of corresponding specifications in corresponding positions according to the display controls and layout parameters, wherein the display is pre-written in the interface layout file. Controls and said layout parameters;
  • a text display module is configured to retrieve a corresponding language translation file according to the target language selected by the user, and add a language text corresponding to the target language to the display interface.
  • a third aspect of the embodiments of the present invention provides a terminal device including a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the processor executes the computer program, Steps to implement the interface display method as described above.
  • a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the interface display method described above.
  • the embodiment of the present invention has the beneficial effect that a visible and available interface display and drawing method is used, and a corresponding display interface is generated by calling a pre-written interface layout file and language translation file, and then Add the text corresponding to the target language selected by the user on the interface. If you want to use another language to display the interface, you can replace the drawn interface layout file and add the described language text to the display interface. Display and input, can quickly switch between multiple languages, easy to use, and low maintenance and development difficulty.
  • FIG. 1 is a schematic flowchart of an interface display method provided by an embodiment of the present invention
  • Figure 2 is a schematic diagram of a Chinese configuration interface
  • FIG. 3 is a schematic diagram of an English configuration interface
  • FIG. 4 is a schematic flowchart of the implementation of step S102 in FIG. 1 according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of an interface display system according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention.
  • FIG. 1 shows an implementation process of an interface display method provided by an embodiment of the present invention.
  • the process execution subject of this embodiment may be a POS (Point Of Sale) device, and discloses a method for supporting POS display in multiple countries. Language approach.
  • POS Point Of Sale
  • the interface display method includes:
  • Step S101 retrieve a corresponding interface layout file according to the target language selected by the user in the language setting;
  • This embodiment realizes the setting of the language by the user.
  • step S102 a corresponding display interface is displayed according to the interface layout file, and interface elements of corresponding specifications and sizes are displayed at corresponding positions according to the display controls and layout parameters, wherein the display layout and the display controls and Mentioned layout parameters;
  • This embodiment implements display of an interface.
  • step S103 according to the target language selected by the user, a corresponding language translation file is retrieved, and a language text corresponding to the target language is added to the display interface.
  • This embodiment is used for displaying characters, and realizes displaying characters.
  • an interface layout file and a language translation file corresponding to different languages are generated in advance, and when used, a corresponding file is selected according to a target language selected by the user.
  • the interface layout file is an xml file and the language translation file is an ini file.
  • the display controls include basic UI controls, such as buttons, check boxes, radio boxes, edit boxes, menus, text boxes, grids, marquees, signature boards, progress bars, and so on.
  • Basic UI controls are generally divided into:
  • Web World Wide Web
  • UI controls charts and graphics, dates and calendars, combo boxes, dialog boxes, progress bars, WYSIWYG editors, etc.
  • iOS basic UI controls Button control, switch control, slider control, toolbar, WebView, etc.
  • Android UI controls text controls, button controls, status switch controls, radio and check buttons, picture controls, clock controls, date and time selection controls, etc.
  • the layout parameters include specifications, shape parameters, and arrangement position parameters of the display control, such as parameters such as size, width, height, and arrangement position.
  • the interface elements include multimedia resources such as pictures, text, graphic images, audio and video.
  • step S102 displaying interface elements of corresponding specifications and sizes in corresponding positions according to the display controls and layout parameters includes: converting the display controls according to the specification shape parameters in the layout parameters, and converting them into images, The image is placed at a corresponding position on a display interface according to an arrangement position parameter in the layout parameters, so as to obtain the interface element.
  • step S103 the language text is added to a corresponding display position in the display interface for text display.
  • the embodiment of the present invention uses a visible and available interface display and drawing method.
  • a corresponding display interface is generated, and text corresponding to a target language selected by a user is added to the interface. If you need to use another language to display the interface, you can simply replace the drawn interface layout file and add the described language text to the display interface to display and input in any language. It can complete the fast switching of multiple languages. Easy to use and easy to maintain and develop.
  • the interface layout file for each language may also be different, but the corresponding display controls should be consistent, for example, a display interface corresponding to English An edit box and a text box are used.
  • the display interface corresponding to Chinese should also include an edit box and a text box, and the display interface corresponding to Arabic should also include an edit box and a text box.
  • a language translation file which describes what the language text (that is, characters) translated for each language looks like.
  • Chinese language translation files can include:
  • Arabic language translation files can include:
  • English language translation files can include:
  • the language text corresponding to the target language can be found, and then the UI text library tool is used to add the language text to the corresponding position of the display interface, thereby realizing the automatic language adaptation function of the display interface.
  • a UI interface drawing tool In the display process of a display interface, generally, a UI interface drawing tool, a UI library tool, and an image resource package are used.
  • the interface display method before step S101, further includes:
  • Step a Use a UI interface drawing tool to generate the interface layout file and the language translation file, and import the interface layout file and the language translation file into a UI library.
  • an interface layout file and a language translation file are generated by using a UI interface drawing tool, which is not coupled with the code, convenient to retrieve, easy to maintain, and convenient for operators to use and master.
  • step a generating an interface layout file includes:
  • the interface layout file is generated by configuring language fields, display controls, and layout parameters in a UI interface drawing tool.
  • step a generating a language translation file includes:
  • the language translation file describes translation texts in different languages in advance to form the language text.
  • the UI interface drawing tool is used to generate an interface layout file and a language translation file.
  • the user can use the configuration interface in the UI interface drawing tool to configure the language.
  • Figure 2 is the Chinese configuration interface. After the configuration shown in Figure 2, a Chinese language translation file is generated, which includes:
  • Figure 3 is the English configuration interface. After the configuration shown in Figure 3, the English language translation file is generated, which includes:
  • step S102 the displaying a corresponding display interface according to the interface layout file includes:
  • Step S201 Use a UI library tool to parse the interface layout file, generate the display interface, and dynamically set interface elements included in the display interface.
  • Step S202 Use the UI library tool to parse out the display controls included in the interface layout file, and display the display controls on the display interface.
  • step S103 adding the language text in the language translation file to the display interface includes:
  • the function of the UI library tool is mainly to dynamically set interface elements included in the display interface, thereby achieving display of display controls, language text, and the like.
  • the interface layout file includes input keyboard controls corresponding to different languages
  • step S102 displaying a corresponding display interface according to the interface layout file includes:
  • the interaction mode between the user and the display interface includes not only display but also input.
  • Different languages have different input methods. For example, Chinese uses Pinyin input and English uses alphabet input.
  • the interface layout file describes different input keyboard controls corresponding to different languages in advance. After analysis by the UI library tool, it can interact with the user on the display interface.
  • the UI library tool will automatically call the corresponding input keyboard control.
  • the user can set and switch different input keyboard controls through a switch button on the display interface.
  • each input keyboard control supports a screen adaptation function
  • the UI library tool automatically adjusts the display size of the input keyboard control according to the screen size
  • the user does not need to know how the input keyboard controls are implemented, but only needs to use the UI library tool to automatically import the required input keyboard controls to the display interface, which realizes convenient and flexible operations and makes the application code more convenient and concise.
  • the interface display method further includes:
  • the required picture is retrieved from the picture resource package and added to the display interface.
  • the picture resource package includes graphic image resources such as pictures and moving pictures.
  • the embodiment of the present invention solves the problem of developing or maintaining a set of code with less resources and energy in the case of multiple languages.
  • the interface design is visible, easy to develop, and easy to maintain.
  • This interface display method supporting multiple languages has a visible and available drawing interface, and supports the display and input functions of Latin, Chinese, and English languages. Applicable in most countries. Unlike the traditional application development process, this interface display method is visible and available, with the function of separating code from interface and language.
  • an interface display system 100 provided by an embodiment of the present invention is configured to execute the method steps in the embodiment corresponding to FIG. 1, which includes:
  • the language setting module 110 is configured to retrieve a corresponding interface layout file according to a target language selected by the user in the language setting;
  • the interface display module 120 is configured to display a corresponding display interface according to the interface layout file, and display interface elements of corresponding specifications and sizes in corresponding positions according to the display controls and layout parameters, wherein the interface layout file is pre-written with the Display controls and said layout parameters;
  • the text display module 130 is configured to retrieve a corresponding language translation file according to the target language selected by the user, and add a language text corresponding to the target language to the display interface.
  • the interface display system 100 further includes:
  • a file acquisition module is used to generate the interface layout file and the language translation file using a UI interface drawing tool, and import the interface layout file and the language translation file into a UI library.
  • the file obtaining module includes:
  • An interface file obtaining unit is configured to generate the interface layout file by configuring language fields, display controls, and layout parameters in a UI interface drawing tool.
  • a language file obtaining unit is configured to generate the language translation file by configuring a language in the UI interface drawing tool, wherein the language translation file describes translation texts in different languages in advance to form the language text .
  • the interface display module 120 includes:
  • a display interface acquisition unit configured to use a UI library tool to parse the interface layout file, generate the display interface, and dynamically set interface elements included in the display interface;
  • a display control obtaining unit is configured to use the UI library tool to parse out the display controls contained in the interface layout file, and display the display controls on the display interface.
  • the interface display module 120 further includes:
  • a keyboard acquisition unit configured to parse the interface layout file using a UI library tool according to the target language selected by the user, and retrieve the input keyboard control corresponding to the target language;
  • a keyboard display unit is configured to display the input keyboard control on the display interface.
  • the text display module 130 includes:
  • the language text acquisition unit is configured to parse the language translation file using a UI library tool to obtain the corresponding language text, and add the language text to a corresponding position of the display interface.
  • the interface display system 100 further includes other functional modules / units, which are used to implement the method steps of each of the embodiments.
  • FIG. 6 is a schematic diagram of a terminal device according to an embodiment of the present invention.
  • the terminal device 6 of this embodiment includes a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60.
  • the processor 60 executes the computer program 62
  • the steps in the embodiments described in Embodiment 1 are implemented, for example, steps S101 to S103 shown in FIG.
  • functions of each module / unit in each system embodiment described in Embodiment 2 are implemented, for example, functions of modules 110 to 130 shown in FIG. 5.
  • the terminal device 6 refers to a terminal with data processing capabilities, including but not limited to POS devices, computers, workstations, servers, and even some smart phones, PDAs, tablet computers, personal digital assistants (PDAs), and smart phones with excellent performance. TV (Smart TV), etc.
  • POS devices POS devices
  • computers workstations, servers
  • smart phones PDAs
  • tablet computers PDAs
  • PDAs personal digital assistants
  • smart phones with excellent performance.
  • TV Smart TV
  • the terminal device may include, but is not limited to, a processor 60 and a memory 61.
  • FIG. 6 is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or fewer components than shown in the figure, or combine some components or different components.
  • the terminal device 6 may further include an input / output device, a network access device, a bus, and the like.
  • the so-called processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6.
  • the memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), and a Secure Digital (SD) provided on the terminal device 6. Card, flash card, etc. Further, the memory 61 may further include both an internal storage unit of the terminal device 6 and an external storage device.
  • the memory 61 is configured to store the computer program and other programs and data required by the terminal device 6.
  • the memory 61 may also be used to temporarily store data that has been output or is to be output.
  • An embodiment of the present invention further provides a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program.
  • the steps in the embodiments described in Embodiment 1 are implemented, for example, as shown in FIG. Steps S101 to S103 shown in FIG. 1.
  • the functions of each module / unit in each system embodiment described in Embodiment 2 are implemented, for example, the functions of modules 110 to 130 shown in FIG. 5.
  • the computer program may be stored in a computer-readable storage medium. When the computer program is executed by a processor, the computer program may implement the steps of the foregoing method embodiments.
  • the computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.
  • the disclosed terminal device and method may be implemented in other manners.
  • the system / terminal device embodiments described above are only schematic.
  • the division of the modules or units is only a logical function division.
  • components can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.

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

本方案提供了一种界面显示方法、系统及终端设备,其中方法包括:根据用户在语言设置中选择的目标语言,调取相应的界面布局文件;按照所述界面布局文件显示相应的显示界面,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素;按照所述用户选择的所述目标语言,调取相应的语言翻译文件,并将其中所述目标语言对应的语言文本添加到所述显示界面中。本方案使用了可见可得的界面显示和绘制方法,通过调用预先编写好的界面布局文件和语言翻译文件,生成相应的显示界面,并在界面上添加用户选择的目标语言对应的文字,能够完成多种语言的快捷切换,使用方便,维护开发难度低。

Description

一种界面显示方法、系统及终端设备 技术领域
本发明属于屏幕显示技术领域,尤其涉及一种界面显示方法、系统及终端设备。
背景技术
UI即User Interface(用户界面)的简称,泛指用户的操作界面,也称人机界面。界面显示应用很广,例如,生活中常见的支付应用中使用的POS设备,也具有显示界面。
传统的POS界面显示对于多种语言的处理为针对该语言修改应用代码,维护起来难度大,代码版本多,开发周期长。对于不同的语言,界面也不同。例如,对于同一个显示内容,英文的显示跟中文、阿拉伯文或波斯文均是不一样的。特别是对于阿拉伯文,即使句宽过长也不能换行的情况,对于显示界面需要很多调整,多出了很多开发量。
综上,现有的界面显示具有使用不便、维护开发难度大的问题。
技术问题
有鉴于此,本发明实施例提供了一种界面显示方法、系统及终端设备,以解决现有技术中界面显示具有使用不便、维护开发难度大的问题。
技术解决方案
本发明实施例的第一方面提供了一种界面显示方法,包括:
根据用户在语言设置中选择的目标语言,调取相应的界面布局文件;
按照所述界面布局文件显示相应的显示界面,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素,其中,所述界面布局文件中预先编写有所述显示控件和所述布局参数;
按照所述用户选择的所述目标语言,调取相应的语言翻译文件,并将其中所述目标语言对应的语言文本添加到所述显示界面中。
本发明实施例的第二方面提供了一种界面显示系统,包括:
语言设置模块,用于根据用户在语言设置中选择的目标语言,调取相应的界面布局文件;
界面显示模块,用于按照所述界面布局文件显示相应的显示界面,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素,其中,所述界面布局文件中预先编写有所述显示控件和所述布局参数;
文字显示模块,用于按照所述用户选择的所述目标语言,调取相应的语言翻译文件,并将其中所述目标语言对应的语言文本添加到所述显示界面中。
本发明实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上所述界面显示方法的步骤。
本发明实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上所述界面显示方法的步骤。
有益效果
本发明实施例与现有技术相比存在的有益效果是:使用了可见可得的界面显示和绘制方法,通过调用预先编写好的界面布局文件和语言翻译文件,生成相应的显示界面,并在界面上添加用户选择的目标语言对应的文字,如需使用另一种语言来显示界面,只需替换绘制好的界面布局文件,并将描述好的语言文本加入显示界面,即可实现任意语言的显示与输入,能够完成多种语言的快捷切换,使用方便,维护开发难度低。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明的一个实施例提供的界面显示方法的实现流程示意图;
图2是一种中文的配置界面的示意图;
图3是一种英文的配置界面的示意图;
图4是本发明的一个实施例提供的图1中步骤S102的实现流程示意图;
图5是本发明的一个实施例提供的界面显示系统的结构示意图;
图6是本发明的一个实施例提供的终端设备的示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。
本发明的说明书和权利要求书及上述附图中的术语“包括”以及其他任何变形,是指“包括但不限于”,意图在于覆盖不排他的包含。例如包含一系列步骤或单元的过程、方法或系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,术语“第一”、“第二”和“第三”等是用于区别不同对象,而非用于描述特定顺序。
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。
实施例1:
图1示出了本发明的一个实施例提供的一种界面显示方法的实现流程,本实施例的流程执行主体可以是POS(Point Of Sale,支付终端)设备,公开了一种支持POS显示多国语言的方法。
如图1所示,在本发明的一个实施例中,所述界面显示方法,包括:
步骤S101,根据用户在语言设置中选择的目标语言,调取相应的界面布局文件;
本实施例实现了用户对语言的设置。
步骤S102,按照所述界面布局文件显示相应的显示界面,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素,其中,所述界面布局文件中预先编写有所述显示控件和所述布局参数;
本实施例实现了界面的显示。
步骤S103,按照所述用户选择的所述目标语言,调取相应的语言翻译文件,并将其中所述目标语言对应的语言文本添加到所述显示界面中。
本实施例,用来进行文字的显示,实现了文字的显示。
在一个实施例中,预先生成了不同语言对应的界面布局文件和语言翻译文件,在使用时,根据用户选择的某一种目标语言,选择相应的文件。
可选地,界面布局文件为xml文件,语言翻译文件为ini文件。
本实施例中,所述显示控件包括基本UI控件,例如按钮、复选框、单选框、编辑框、菜单、文本框、网格、跑马灯、签名板、进度条等。
基本UI控件,一般分为:
Web(World Wide Web)UI控件:图表和图形、日期和日历、组合框、对话框、进度条、所见即所得编辑器等。
iOS基本UI控件:Button控件、开关控件、滑块控件、工具栏、WebView等。
安卓UI控件:文本控件、按钮控件、状态开关控件、单选与复选按钮、图片控件、时钟控件、日期与时间选择控件等。
本实施例中,所述布局参数包括显示控件的规格形状参数和排列位置参数,例如大小、宽高、排列位置等参数。
在一个实施例中,所述界面元素包括图片、文字、图形图像、音视频等多媒体资源。
在一个实施例中,步骤S102中,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素,包括:将显示控件按照所述布局参数中的规格形状参数进行转换,转换成为图像,将所述图像按照所述布局参数中的排列位置参数放置在显示界面的相应位置,从而得到所述界面元素。
在一个实施例中,在步骤S103中,将所述语言文本添加到所述显示界面中对应的显示位置,以进行文字显示。
本发明实施例使用了可见可得的界面显示和绘制方法,通过调用预先编写好的界面布局文件和语言翻译文件,生成相应的显示界面,并在界面上添加用户选择的目标语言对应的文字,如需使用另一种语言来显示界面,只需替换绘制好的界面布局文件,并将描述好的语言文本加入显示界面,即可实现任意语言的显示与输入,能够完成多国语言的快捷切换,使用方便,维护开发难度低。
需要说明的是,由于不同的语言所占显示的行宽不同,故每种语言的界面布局文件也可能是不同的,但对应的显示控件应该是一致的,例如,英文对应的某一显示界面使用了一个编辑框一个文本框,中文对应的显示界面也应该包含一个编辑框一个文本框,阿拉伯文对应的显示界面也应该包含一个编辑框一个文本框。
其中,为了解决不同语言间转换的问题,采用了一种语言翻译文件,描述了每种语言翻译的语言文本(即字符)是什么样的。
以一个具体应用场景为例,例如一个显示界面中有一个编辑框一个文本框,那么:
中文的语言翻译文件可以包括:
TextBox=消费
EditBox=打印
阿拉伯文的语言翻译文件可以包括:
Figure PCTCN2019102296-appb-000001
Figure PCTCN2019102296-appb-000002
英文的语言翻译文件可以包括:
TextBox=Sale
EditBox=Print
通过语言翻译文件,可以找到目标语言对应的语言文本,再利用UI库工具,将所述语言文本添加到所述显示界面的相应位置上,从而实现了显示界面的自动适应语言功能。
在一个显示界面的显示过程中,一般需要用到UI界面绘制工具、UI库工具和图片资源包等。
在本发明的一个实施例中,在步骤S101之前,所述界面显示方法还包括:
步骤a,使用UI界面绘制工具生成所述界面布局文件和所述语言翻译文件,并将所述界面布局文件和所述语言翻译文件导入UI库。
本实施例中,利用UI界面绘制工具生成界面布局文件和语言翻译文件,与代码不耦合,调取方便,易于维护,便于操作人员使用和掌握。
在本发明的一个实施例中,在步骤a中,生成界面布局文件,包括:
通过在UI界面绘制工具中对语言字段、显示控件和布局参数的配置,生成所述界面布局文件。
在本发明的一个实施例中,在步骤a中,生成语言翻译文件,包括:
1)通过在所述UI界面绘制工具中对语言的配置,生成所述语言翻译文件;
2)所述语言翻译文件中预先描述有不同语言的翻译文本,组成所述语言文本。
本实施例中,UI界面绘制工具用于生成界面布局文件和语言翻译文件。
如图2和图3所示的UI界面绘制工具的配置界面,用户可利用UI界面绘制工具在其中的配置界面进行语言的配置。
图2为中文的配置界面,经过如图2所示的配置,生成中文的语言翻译文件,其中内容包括:
[page1.xml]
TextBox1=显示
EditBox1=消费
[page11.xml]
Marquee1=打印
图3为英文的配置界面,经过如图3所示的配置,生成英文的语言翻译文件,其中内容包括:
[page1.xml]
TextBox1=Disp
EditBox1=Sale
[page11.xml]
Marquee1=Print
如图4所示,在本发明的一个实施例中,在步骤S102中,所述按照所述界面布局文件显示相应的显示界面,包括:
步骤S201,使用UI库工具,对所述界面布局文件进行解析,生成所述显示界面,并对所述显示界面包含的界面元素进行动态设置。
步骤S202,使用所述UI库工具,解析出所述界面布局文件中包含的显示控件,并在所述显示界面显示所述显示控件。
在本发明的一个实施例中,在步骤S103中,将所述语言翻译文件中的语言文本添加到所述显示界面中,包括:
使用UI库工具对所述语言翻译文件进行解析,得到相应的所述语言文本,并将所述语言文本添加到所述显示界面的相应位置。
本实施例中,UI库工具的功能主要为对所述显示界面包含的界面元素进行动态设置,从而实现显示控件、语言文本等的显示。
在本发明的一个实施例中,所述界面布局文件包括不同语言对应的输入键盘控件;
在本发明的一个实施例中,在步骤S102中,按照所述界面布局文件显示相应的显示界面,包括:
1)根据所述用户选择的所述目标语言,使用UI库工具对所述界面布局文件进行解析,调取所述目标语言对应的所述输入键盘控件;
2)将所述输入键盘控件在所述显示界面上进行显示。
本实施例中,用户与显示界面的交互方式不仅包括显示,还包括输入。不同语言的输入方式是不同的,例如,中文采用拼音输入,英文采用字母输入。
界面布局文件中预先描述了不同语言对应的不同的输入键盘控件,经过 UI库工具的解析,可在显示界面上与用户交互。
在一个实施例中,通过用户在语言设置中选择的目标语言,UI库工具将自动调取对应的输入键盘控件。
在一个实施例中,通过显示界面上的切换按钮,实现用户设置和切换不同的输入键盘控件。
在一个实施例中,每种输入键盘控件均支持屏幕自适应功能,UI库工具自动根据屏幕大小调整输入键盘控件的显示大小。
本实施例中,用户不需要了解输入键盘控件具体是如何实现的,只需利用UI库工具自动导入所需的输入键盘控件至显示界面,实现了方便灵活的操作,使应用代码更加方便简洁。
在一个实施例中,所述界面显示方法,还包括:
从图片资源包中调取所需的图片,添加到所述显示界面。
其中,图片资源包中包括图片、动图等图形图像资源。
本发明实施例,解决了在多种语言的情况下,使用更少资源与精力去开发或者维护一套代码,在业务逻辑一致,界面风格一致的情况下,不需要修改应用代码,只需替换几个文件即可实现其他语言的适配显示与输入。并且,界面设计可见可得,开发简单,维护容易。这种支持多种语言的界面显示方法,具有可见可得绘制界面,支持拉丁语系、中文语系、英文语系的显示与输入的功能。在大多数国家均适用,不同于传统的应用开发流程,该界面显示方法为可见可得,具有代码与界面、语言分离的功能。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
实施例2:
如图5所示,本发明的一个实施例提供的界面显示系统100,用于执行图1所对应的实施例中的方法步骤,其包括:
语言设置模块110,用于根据用户在语言设置中选择的目标语言,调取相应的界面布局文件;
界面显示模块120,用于按照所述界面布局文件显示相应的显示界面,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素,其中,所述界面布局文件中预先编写有所述显示控件和所述布局参数;
文字显示模块130,用于按照所述用户选择的所述目标语言,调取相应的语言翻译文件,并将其中所述目标语言对应的语言文本添加到所述显示界面中。
在本发明的一个实施例中,界面显示系统100还包括:
文件获取模块,用于使用UI界面绘制工具生成所述界面布局文件和所述语言翻译文件,并将所述界面布局文件和所述语言翻译文件导入UI库。
在本发明的一个实施例中,文件获取模块包括:
界面文件获取单元,用于通过在UI界面绘制工具中对语言字段、显示控件和布局参数的配置,生成所述界面布局文件。
语言文件获取单元,用于通过在所述UI界面绘制工具中对语言的配置,生成所述语言翻译文件,其中,所述语言翻译文件中预先描述有不同语言的翻译文本,组成所述语言文本。
在本发明的一个实施例中,界面显示模块120包括:
显示界面获取单元,用于使用UI库工具,对所述界面布局文件进行解析,生成所述显示界面,并对所述显示界面包含的界面元素进行动态设置;
显示控件获取单元,用于使用所述UI库工具,解析出所述界面布局文件中包含的显示控件,并在所述显示界面显示所述显示控件。
在本发明的一个实施例中,界面显示模块120还包括:
键盘获取单元,用于根据所述用户选择的所述目标语言,使用UI库工具对所述界面布局文件进行解析,调取所述目标语言对应的所述输入键盘控件;
键盘显示单元,用于将所述输入键盘控件在所述显示界面上进行显示。
在本发明的一个实施例中,文字显示模块130包括:
语言文本获取单元,用于使用UI库工具对所述语言翻译文件进行解析,得到相应的所述语言文本,并将所述语言文本添加到所述显示界面的相应位置。
在一个实施例中,界面显示系统100还包括其他功能模块/单元,用于实现实施例1中各实施例的方法步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即所述界面显示系统100的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。实施例中的各功能模块可以 集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述界面显示系统100中模块的具体工作过程,可以参考实施例1中的对应过程,在此不再赘述。
实施例3:
图6是本发明一实施例提供的终端设备的示意图。如图6所示,该实施例的终端设备6包括:处理器60、存储器61以及存储在所述存储器61中并可在所述处理器60上运行的计算机程序62。所述处理器60执行所述计算机程序62时实现如实施例1中所述的各实施例中的步骤,例如图1所示的步骤S101至S103。或者,所述处理器60执行所述计算机程序62时实现如实施例2中所述的各系统实施例中的各模块/单元的功能,例如图5所示模块110至130的功能。
所述终端设备6是指具有数据处理能力的终端,包括但不限于POS设备、计算机、工作站、服务器,甚至是一些性能优异的智能手机、掌上电脑、平板电脑、个人数字助理(PDA)、智能电视(Smart TV)等。以上详细罗列了终端设备6的具体实例,本领域技术人员可以意识到,终端设备并不限于上述罗列实例。
所述终端设备可包括,但不仅限于,处理器60、存储器61。本领域技术人员可以理解,图6仅仅是终端设备6的示例,并不构成对终端设备6的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备6还可以包括输入输出设备、网络接入设备、总线等。
所称处理器60可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器61可以是所述终端设备6的内部存储单元,例如终端设备6的硬盘或内存。所述存储器61也可以是所述终端设备6的外部存储设备,例如所述终端设备6上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器61还可以既包括所述终端设备6的内部存储单元也包括外部存储设备。所述存储器61用于存储所述计算机程序以及所述终端设备6所需的其他程序和数据。所述存储器61还可以用于暂时地存储已经输出或者将要输出的数据。
实施例4:
本发明实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时实现如实施例1中所述的各实施例中的步骤,例如图1所示的步骤S101至步骤S103。或者,所述计算机程序被处理器执行时实现如实施例2中所述的各系统实施例中的各模块/单元的功能,例如图5所示的模块110至130的功能。
所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包 括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。
在上述实施例中,对各个实施例的描述都各有侧重,实施例1至4可以任意组合,组合后形成的新的实施例也在本申请的保护范围之内。某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
在本发明所提供的实施例中,应该理解到,所揭露的终端设备和方法,可以通过其它的方式实现。例如,以上所描述的系统/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照 前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种界面显示方法,其特征在于,包括:
    根据用户在语言设置中选择的目标语言,调取相应的界面布局文件;
    按照所述界面布局文件显示相应的显示界面,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素,其中,所述界面布局文件中预先编写有所述显示控件和所述布局参数;
    按照所述用户选择的所述目标语言,调取相应的语言翻译文件,并将其中所述目标语言对应的语言文本添加到所述显示界面中。
  2. 如权利要求1所述的界面显示方法,其特征在于,还包括:
    使用UI界面绘制工具生成所述界面布局文件和所述语言翻译文件,并将所述界面布局文件和所述语言翻译文件导入UI库。
  3. 如权利要求2所述的界面显示方法,其特征在于,生成界面布局文件,包括:
    通过在UI界面绘制工具中对语言字段、显示控件和布局参数的配置,生成所述界面布局文件。
  4. 如权利要求2所述的界面显示方法,其特征在于,生成语言翻译文件,包括:
    通过在所述UI界面绘制工具中对语言的配置,生成所述语言翻译文件;
    所述语言翻译文件中预先描述有不同语言的翻译文本,组成所述语言文本。
  5. 如权利要求1所述的界面显示方法,其特征在于,所述按照所述界面布局文件显示相应的显示界面,包括:
    使用UI库工具,对所述界面布局文件进行解析,生成所述显示界面,并 对所述显示界面包含的界面元素进行动态设置;
    使用所述UI库工具,解析出所述界面布局文件中包含的显示控件,并在所述显示界面显示所述显示控件。
  6. 如权利要求1所述的界面显示方法,其特征在于,将所述语言翻译文件中的语言文本添加到所述显示界面中,包括:
    使用UI库工具对所述语言翻译文件进行解析,得到相应的所述语言文本,并将所述语言文本添加到所述显示界面的相应位置。
  7. 如权利要求1至6任一项所述的界面显示方法,其特征在于,所述界面布局文件包括不同语言对应的输入键盘控件;
    按照所述界面布局文件显示相应的显示界面,包括:
    根据所述用户选择的所述目标语言,使用UI库工具对所述界面布局文件进行解析,调取所述目标语言对应的所述输入键盘控件;
    将所述输入键盘控件在所述显示界面上进行显示。
  8. 一种界面显示系统,其特征在于,包括:
    语言设置模块,用于根据用户在语言设置中选择的目标语言,调取相应的界面布局文件;
    界面显示模块,用于按照所述界面布局文件显示相应的显示界面,按照显示控件和布局参数,在相应位置显示相应规格大小的界面元素,其中,所述界面布局文件中预先编写有所述显示控件和所述布局参数;
    文字显示模块,用于按照所述用户选择的所述目标语言,调取相应的语言翻译文件,并将其中所述目标语言对应的语言文本添加到所述显示界面中。
  9. 一种终端设备,其特征在于,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程 序时实现如权利要求1至7任一项所述界面显示方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述界面显示方法的步骤。
PCT/CN2019/102296 2018-09-05 2019-08-23 一种界面显示方法、系统及终端设备 WO2020048326A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811030912.8A CN109445886A (zh) 2018-09-05 2018-09-05 一种界面显示方法、系统及终端设备
CN201811030912.8 2018-09-05

Publications (1)

Publication Number Publication Date
WO2020048326A1 true WO2020048326A1 (zh) 2020-03-12

Family

ID=65530447

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102296 WO2020048326A1 (zh) 2018-09-05 2019-08-23 一种界面显示方法、系统及终端设备

Country Status (2)

Country Link
CN (1) CN109445886A (zh)
WO (1) WO2020048326A1 (zh)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445886A (zh) * 2018-09-05 2019-03-08 百富计算机技术(深圳)有限公司 一种界面显示方法、系统及终端设备
CN110471659B (zh) * 2019-08-16 2023-07-21 珠海格力电器股份有限公司 多语言实现方法和系统、人机界面组态软件端和设备端
CN110826296A (zh) * 2019-11-01 2020-02-21 广州华多网络科技有限公司 文本字体切换的方法、装置、计算机可读介质以及设备
CN112988292A (zh) * 2019-12-17 2021-06-18 青岛海信传媒网络技术有限公司 一种多语言翻译文件生成方法及终端
CN111143010A (zh) * 2019-12-26 2020-05-12 深圳Tcl数字技术有限公司 终端设备的控制方法、终端设备及存储介质
CN111273978A (zh) * 2020-01-14 2020-06-12 网易(杭州)网络有限公司 一种多语言游戏资源的配置方法及装置
CN111399954A (zh) * 2020-03-10 2020-07-10 北京字节跳动网络技术有限公司 界面交互方法、装置、存储介质及电子设备
CN114201978A (zh) * 2020-09-18 2022-03-18 华为技术有限公司 一种对应用程序的界面进行翻译的方法及相关设备
CN112988297A (zh) * 2021-03-10 2021-06-18 深圳市创想三维科技有限公司 基于触摸屏的语言切换方法、装置、电子设备及存储介质
CN113177389A (zh) * 2021-04-23 2021-07-27 网易(杭州)网络有限公司 文本处理方法、装置、电子设备及存储介质
CN113296770A (zh) * 2021-04-28 2021-08-24 厦门科灿信息技术有限公司 设备管理界面的生成方法、生成装置及终端
CN113535025A (zh) * 2021-07-28 2021-10-22 中国工商银行股份有限公司 多语言页面布局方法、装置、设备、介质及程序产品

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042643A (zh) * 2006-03-24 2007-09-26 国际商业机器公司 在本地化过程中调整图形用户界面布局的方法及装置
CN101699394A (zh) * 2009-10-28 2010-04-28 金蝶软件(中国)有限公司 一种自动生成用户界面的方法及装置
CN102207870A (zh) * 2011-06-08 2011-10-05 广东威创视讯科技股份有限公司 多语言版本的界面自适应方法及系统
CN103377051A (zh) * 2013-07-16 2013-10-30 广东欧珀移动通信有限公司 一种基于Android系统的应用界面自定义方法
CN109445886A (zh) * 2018-09-05 2019-03-08 百富计算机技术(深圳)有限公司 一种界面显示方法、系统及终端设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140035823A1 (en) * 2012-08-01 2014-02-06 Apple Inc. Dynamic Context-Based Language Determination
CN104951364B (zh) * 2014-03-31 2019-01-29 Tcl集团股份有限公司 一种基于Android平台的语言切换方法及系统
WO2017009965A1 (ja) * 2015-07-15 2017-01-19 三菱電機株式会社 表示制御装置および表示制御方法
CN106598562A (zh) * 2016-10-14 2017-04-26 珠海格力电器股份有限公司 多语言界面的控件自适应方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042643A (zh) * 2006-03-24 2007-09-26 国际商业机器公司 在本地化过程中调整图形用户界面布局的方法及装置
CN101699394A (zh) * 2009-10-28 2010-04-28 金蝶软件(中国)有限公司 一种自动生成用户界面的方法及装置
CN102207870A (zh) * 2011-06-08 2011-10-05 广东威创视讯科技股份有限公司 多语言版本的界面自适应方法及系统
CN103377051A (zh) * 2013-07-16 2013-10-30 广东欧珀移动通信有限公司 一种基于Android系统的应用界面自定义方法
CN109445886A (zh) * 2018-09-05 2019-03-08 百富计算机技术(深圳)有限公司 一种界面显示方法、系统及终端设备

Also Published As

Publication number Publication date
CN109445886A (zh) 2019-03-08

Similar Documents

Publication Publication Date Title
WO2020048326A1 (zh) 一种界面显示方法、系统及终端设备
US11226717B2 (en) User interface display method and apparatus, device, and storage medium
WO2019174469A1 (zh) 消息提醒方法、装置、设备及存储介质
CN105653254B (zh) 原生界面适配方法、装置及应用其的电子设备
US8555186B2 (en) Interactive thumbnails for transferring content among electronic documents
US8769430B2 (en) Multi-column formatted page scrolling
WO2019174466A1 (zh) 消息提醒方法、装置、设备及存储介质
WO2017166210A1 (zh) 应用程序的处理方法及终端设备
CN109471626B (zh) 页面逻辑结构、页面生成方法、页面数据处理方法及装置
CN106056530B (zh) 应用中图片内容的显示方法及装置
CN112363794B (zh) 一种前端列表类组件的渲染方法及电子设备
WO2017028611A1 (zh) 一种表单实现方法及装置
CN102929867A (zh) 用于自动化的文档翻译的技术
CN113031946B (zh) 一种渲染页面组件的方法和装置
US20170235473A1 (en) Method and Apparatus for Loading Application Program View, and Electronic Terminal
CN112272109A (zh) 一种网络拓扑图生成方法、设备及系统
MX2014009068A (es) Metodo, terminal y dispositivo electronico para procesar documento de libro electronico.
US9548042B2 (en) Responsive document breakpoints systems and methods
CN115712413A (zh) 低代码开发方法、装置、设备及存储介质
CN113391808A (zh) 页面的配置方法、装置及电子设备
CN115935925A (zh) 表格适配方法、电子设备及计算机可读存储介质
US10747943B2 (en) Method, device, client apparatus, and electronic device for presenting webpages
CN111324398A (zh) 最近内容的处理方法、装置、终端及存储介质
CN116301785A (zh) 自定义文本编辑器组件的实现方法及装置
CN114548056A (zh) 富文本编辑方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19857230

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19857230

Country of ref document: EP

Kind code of ref document: A1