技术领域technical field
本发明实施例涉及计算机领域,特别涉及一种显示文本的方法、装置及终端。The embodiments of the present invention relate to the field of computers, and in particular to a method, device and terminal for displaying text.
背景技术Background technique
随着全球化程度的加深,使用不同语言的用户之间的交流需求也日益旺盛,提供有翻译功能的移动终端的使用也越来越普遍。With the deepening of globalization, the need for communication between users using different languages is also increasing, and the use of mobile terminals with translation functions is becoming more and more common.
相关技术中,当用户A在移动终端中输入第一原文本后,终端将在屏幕的显示区域中显示出第一原文本翻译后的第一译文本。此时,用户A需要将移动终端交给查看第一译文本的用户B来查看,以便该用户B通过第一译文本获取第一原文本的语义。In the related art, after user A enters the first original text in the mobile terminal, the terminal will display the first translated text after the translation of the first original text in the display area of the screen. At this time, user A needs to hand over the mobile terminal to user B who views the first translated text, so that user B can obtain the semantics of the first original text through the first translated text.
然而,在不同的用户交替查看移动终端显示的译文本时,终端显示译文本的效率不高,从而影响了使用不同语言的用户之间的交流效率。However, when different users alternately check the translated text displayed on the mobile terminal, the efficiency of displaying the translated text by the terminal is not high, thereby affecting the communication efficiency between users who use different languages.
发明内容Contents of the invention
本发明提供了一种显示文本的方法、装置及终端,可以用于解决在不同的用户交替查看移动终端显示的译文本时,终端显示译文本的效率不高,从而影响了使用不同语言的用户之间的交流效率。所述技术方案如下:The present invention provides a method, device and terminal for displaying text, which can be used to solve the problem that when different users alternately check the translated text displayed on the mobile terminal, the efficiency of the terminal displaying the translated text is not high, thus affecting users who use different languages communication efficiency between them. Described technical scheme is as follows:
第一方面,提供了一种显示文本的方法,用于具有折叠显示屏的终端,所述终端具有第一壳体和第二壳体,所述第一壳体与所述折叠显示屏的第一显示区域对应,所述第二壳体与所述折叠显示屏的第二显示区域对应,所述方法包括:In a first aspect, a method for displaying text is provided, which is used for a terminal with a foldable display screen, the terminal has a first housing and a second housing, the first housing and the second housing of the foldable display screen Corresponding to a display area, the second housing corresponds to the second display area of the folding display screen, the method includes:
获取在所述第一显示区域中,以第一预设语言输入的第一原文本;Acquiring the first original text input in the first preset language in the first display area;
翻译所述第一原文本,获得第一译文本,所述第一译文本是与第二预设语言相对应的文本;Translating the first original text to obtain a first translation, the first translation is a text corresponding to a second preset language;
在所述第一显示区域中显示所述第一原文本,并在所述第二显示区域中显示所述第一译文本。The first original text is displayed in the first display area, and the first translated text is displayed in the second display area.
第二方面,提供了一种界面展示装置,用于具有折叠显示屏的终端,所述终端具有第一壳体和第二壳体,所述第一壳体与所述折叠显示屏的第一显示区域对应,所述第二壳体与所述折叠显示屏的第二显示区域对应,所述装置包括:In a second aspect, an interface display device is provided for a terminal with a foldable display screen, the terminal has a first housing and a second housing, the first housing and the first housing of the foldable display screen Corresponding to the display area, the second housing corresponds to the second display area of the folding display screen, and the device includes:
获取模块,用于获取在所述第一显示区域中,以第一预设语言输入的第一原文本;An acquisition module, configured to acquire the first original text input in the first preset language in the first display area;
翻译模块,用于翻译所述第一原文本,获得第一译文本,所述第一译文本是与第二预设语言相对应的文本;a translation module, configured to translate the first original text to obtain a first translated text, and the first translated text is a text corresponding to a second preset language;
显示模块,用于在所述第一显示区域中显示所述第一原文本,并在所述第二显示区域中显示所述第一译文本。A display module, configured to display the first original text in the first display area, and display the first translated text in the second display area.
第三方面,提供了一种终端,所述终端包括:处理器、与所述处理器相连的存储器,以及存储在所述存储器上的程序指令,所述处理器执行所述程序指令时实现如第一方面所述的显示文本的方法。In a third aspect, a terminal is provided. The terminal includes: a processor, a memory connected to the processor, and program instructions stored in the memory. When the processor executes the program instructions, the following steps are implemented: The method for displaying text described in the first aspect.
第四方面,一种计算机可读介质,其上存储有程序指令,所述程序指令被处理器执行时实现如第一方面所述的显示文本的方法。In a fourth aspect, a computer-readable medium stores program instructions thereon, and when the program instructions are executed by a processor, the method for displaying text as described in the first aspect is implemented.
本发明实施例提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solution provided by the embodiments of the present invention are:
本方案应用在包括第一显示屏区域和第二显示屏区域的折叠屏终端中,通过获取在第一显示区域中以第一预设语言输入的第一原文本;翻译第一原文本,获得第一译文本,第一译文本是与第二预设语言相对应的文本;在第一显示区域中显示第一原文本,并在第二显示区域中显示第一译文本。由于终端能够同时折叠屏终端的两个不同的显示屏区域中分别显示第一译文本和第一原文本,因此方便使用第一预设语言的用户和使用第二预设语言的用户分别查看第一原文本和第一译文本,从而提高了第一原文本和第一译文本的显示效率。This solution is applied to a folding screen terminal including a first display area and a second display area, by obtaining the first original text input in the first preset language in the first display area; translating the first original text, to obtain The first translated text, the first translated text is text corresponding to the second preset language; the first original text is displayed in the first display area, and the first translated text is displayed in the second display area. Since the terminal can display the first translated text and the first original text in two different display areas of the folding screen terminal at the same time, it is convenient for users who use the first preset language and users who use the second preset language to view the first translated text respectively. An original text and the first translated text, thereby improving the display efficiency of the first original text and the first translated text.
附图说明Description of drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.
图1和图2是本发明一个示例性实施例提供的终端的结构方框图;FIG. 1 and FIG. 2 are structural block diagrams of a terminal provided by an exemplary embodiment of the present invention;
图3至图5是本发明一个示例性实施例提供的折叠屏终端的结构示意图;3 to 5 are schematic structural diagrams of a folding screen terminal provided by an exemplary embodiment of the present invention;
图6示出了本发明的一个示例性实施例提供的一种显示文本的方法的流程图;Fig. 6 shows a flowchart of a method for displaying text provided by an exemplary embodiment of the present invention;
图7示出了本发明的一个示例性实施例提供的另一种显示文本的方法的流程图;FIG. 7 shows a flowchart of another method for displaying text provided by an exemplary embodiment of the present invention;
图8是基于图7所示实施例提供的一种折叠状态下的第一显示区域的界面图;Fig. 8 is an interface diagram of the first display area in a folded state provided based on the embodiment shown in Fig. 7;
图9是基于图7所示实施例提供的一种折叠状态下的第二显示区域的界面图;Fig. 9 is an interface diagram of a second display area in a folded state provided based on the embodiment shown in Fig. 7;
图10是基于图7所示实施例提供的一种展开状态下的界面图;Fig. 10 is an interface diagram in an unfolded state provided based on the embodiment shown in Fig. 7;
图11是本发明一个实施例提供的一种显示文本的装置的结构方框图。Fig. 11 is a structural block diagram of a device for displaying text provided by an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.
参考图1和图2所示,其示出了本申请一个示例性实施例提供的终端100的结构方框图。该终端100可以是智能手机、平板电脑和电子书等等。本申请中的终端100可以包括一个或多个如下部件:处理器110、存储器120和触摸显示屏130。Referring to FIG. 1 and FIG. 2 , it shows a structural block diagram of a terminal 100 provided by an exemplary embodiment of the present application. The terminal 100 can be a smart phone, a tablet computer, an e-book, and so on. The terminal 100 in this application may include one or more of the following components: a processor 110 , a memory 120 and a touch display 130 .
处理器110可以包括一个或者多个处理核心。处理器110利用各种接口和线路连接整个终端100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行终端100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable LogicArray,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(CentralProcessing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责触摸显示屏130所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块芯片进行实现。Processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire terminal 100, and executes the terminal by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. 100's of various functions and processing data. Optionally, the processor 110 may use at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable LogicArray, PLA). implemented in the form of hardware. The processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface and application programs, etc.; the GPU is responsible for rendering and drawing the content that needs to be displayed on the touch screen 130 ; the modem is used for processing wireless communication. It can be understood that, the above-mentioned modem may not be integrated into the processor 110, but implemented by a single chip.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选地,该存储器120包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储根据终端100的使用所创建的数据(比如音频数据、电话本)等。The memory 120 may include a random access memory (Random Access Memory, RAM), and may also include a read-only memory (Read-Only Memory). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data created according to the use of the terminal 100 (such as audio data, phonebook) and the like.
以操作系统为安卓(Android)系统为例,存储器120中存储的程序和数据如图1所示,存储器120中存储有Linux内核层220、系统运行库层240、应用框架层260和应用层280。Linux内核层220为终端100的各种硬件提供了底层的驱动,如显示驱动、音频驱动、摄像头驱动、蓝牙驱动、Wi-Fi驱动、电源管理等。系统运行库层240通过一些C/C++库来为Android系统提供了主要的特性支持。如SQLite库提供了数据库的支持,OpenGL/ES库提供了3D绘图的支持,Webkit库提供了浏览器内核的支持等。在系统运行库层240中还提供有安卓运行时库(Android Runtime),它主要提供了一些核心库,能够允许开发者使用Java语言来编写Android应用。应用框架层260提供了构建应用程序时可能用到的各种API,开发者也可以通过使用这些API来构建自己的应用程序,比如活动管理、窗口管理、视图管理、通知管理、内容提供者、包管理、通话管理、资源管理、定位管理。应用层280中运行有至少一个应用程序,这些应用程序可以是操作系统自带的联系人程序、短信程序、时钟程序、相机应用等;也可以是第三方开发者所开发的应用程序,比如即时通信程序、相片美化程序等。Taking the operating system as an Android system as an example, the programs and data stored in the memory 120 are as shown in Figure 1, and the memory 120 is stored with a Linux kernel layer 220, a system runtime layer 240, an application framework layer 260 and an application layer 280 . The Linux kernel layer 220 provides underlying drivers for various hardware of the terminal 100, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, and so on. The system runtime layer 240 provides main feature support for the Android system through some C/C++ libraries. For example, the SQLite library provides database support, the OpenGL/ES library provides 3D drawing support, and the Webkit library provides browser kernel support. An Android Runtime library (Android Runtime) is also provided in the system runtime library layer 240, which mainly provides some core libraries and can allow developers to use the Java language to write Android applications. The application framework layer 260 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content providers, Package management, call management, resource management, location management. There is at least one application program running in the application layer 280, and these application programs can be contact programs, SMS programs, clock programs, camera applications, etc. Communication programs, photo beautification programs, etc.
以操作系统为IOS系统为例,存储器120中存储的程序和数据如图2所示,IOS系统包括:核心操作系统层320(Core OS layer)、核心服务层340(Core Services layer)、媒体层360(Media layer)、可触摸层380(Cocoa Touch Layer)。核心操作系统层320包括了操作系统内核、驱动程序以及底层程序框架,这些底层程序框架提供更接近硬件的功能,以供位于核心服务层340的程序框架所使用。核心服务层340提供给应用程序所需要的系统服务和/或程序框架,比如基础(Foundation)框架、账户框架、广告框架、数据存储框架、网络连接框架、地理位置框架、运动框架等等。媒体层360为应用程序提供有关视听方面的接口,如图形图像相关的接口、音频技术相关的接口、视频技术相关的接口、音视频传输技术的无线播放(AirPlay)接口等。可触摸层380为应用程序开发提供了各种常用的界面相关的框架,可触摸层380负责用户在终端100上的触摸交互操作。比如本地通知服务、远程推送服务、广告框架、游戏工具框架、消息用户界面接口(User Interface,UI)框架、用户界面UIKit框架、地图框架等等。Taking the operating system as the IOS system as an example, the programs and data stored in the memory 120 are as shown in Figure 2, and the IOS system includes: a core operating system layer 320 (Core OS layer), a core service layer 340 (Core Services layer), a media layer 360 (Media layer), touchable layer 380 (Cocoa Touch Layer). The core operating system layer 320 includes an operating system kernel, drivers, and underlying program frameworks. These underlying program frameworks provide functions closer to hardware for use by the program frameworks located in the core service layer 340 . The core service layer 340 provides system services and/or program frameworks required by applications, such as foundation framework, account framework, advertisement framework, data storage framework, network connection framework, geographic location framework, exercise framework and so on. The media layer 360 provides audio-visual interfaces for applications, such as interfaces related to graphics and images, interfaces related to audio technology, interfaces related to video technology, and wireless playback (AirPlay) interfaces of audio and video transmission technologies. The touchable layer 380 provides various commonly used interface-related frameworks for application development, and the touchable layer 380 is responsible for the user's touch interaction operation on the terminal 100 . Such as local notification service, remote push service, advertisement framework, game tool framework, message user interface interface (User Interface, UI) framework, user interface UIKit framework, map framework and so on.
在图2所示出的框架中,与大部分应用程序有关的框架包括但不限于:核心服务层340中的基础框架和可触摸层380中的UIKit框架。基础框架提供许多基本的对象类和数据类型,为所有应用程序提供最基本的系统服务,和UI无关。而UIKit框架提供的类是基础的UI类库,用于创建基于触摸的用户界面,iOS应用程序可以基于UIKit框架来提供UI,所以它提供了应用程序的基础架构,用于构建用户界面,绘图、处理和用户交互事件,响应手势等等。In the framework shown in FIG. 2 , frameworks related to most applications include but not limited to: the basic framework in the core service layer 340 and the UIKit framework in the touchable layer 380 . The basic framework provides many basic object classes and data types, and provides the most basic system services for all applications, regardless of UI. The class provided by the UIKit framework is a basic UI class library for creating a touch-based user interface. iOS applications can provide UI based on the UIKit framework, so it provides the infrastructure of the application for building user interfaces, drawing , Handle and user interaction events, respond to gestures, and more.
触摸显示屏130用于接收用户使用手指、触摸笔等任何适合的物体在其上或附近的触摸操作,以及显示各个应用程序的用户界面。触摸显示屏130通常设置在终端100的前面板。The touch display screen 130 is used to receive a user's touch operation on or near it using any suitable object such as a finger or a touch pen, and to display user interfaces of various application programs. The touch display screen 130 is generally arranged on the front panel of the terminal 100 .
如图3所示,终端100包括第一壳体41、第二壳体42以及连接于第一壳体41和第二壳体42之间的连接组件43,第一壳体41与第二壳体42通过连接组件43实现翻转折叠。As shown in FIG. 3 , the terminal 100 includes a first housing 41 , a second housing 42 and a connection assembly 43 connected between the first housing 41 and the second housing 42 , the first housing 41 and the second housing The body 42 is flipped and folded through the connection assembly 43 .
第一壳体41包括与触摸显示屏背面连接的第一支撑面,以及与第一支撑面相对的第一背面,第二壳体42包括与触摸显示屏背面连接的第二支撑面,以及与第二支撑面相对的第二背面。相应的,触摸显示屏包括第一显示区域131、第二显示区域132和第三显示区域133,其中,第一显示区域131与第一壳体41的位置对应,第二显示区域132与第二壳体42的位置对应,第三显示区域133与连接组件43的位置对应。在一种实现方式中,第一显示区域131、第二显示区域132和第三显示区域133均采用柔性材料制成,具有一定的伸缩延展性;在另一种实现方式中,仅第三显示区域133采用柔性材料制成,第一显示区域131和第二显示区域132采用非柔性材料制成。The first housing 41 includes a first support surface connected to the back of the touch screen, and a first back opposite to the first support surface, and the second housing 42 includes a second support surface connected to the back of the touch screen, and a second support surface connected to the back of the touch screen. The second back surface opposite to the second supporting surface. Correspondingly, the touch display screen includes a first display area 131, a second display area 132 and a third display area 133, wherein the first display area 131 corresponds to the position of the first housing 41, and the second display area 132 corresponds to the position of the second The position of the housing 42 corresponds, and the third display area 133 corresponds to the position of the connecting component 43 . In one implementation, the first display area 131, the second display area 132, and the third display area 133 are all made of flexible materials, which have certain stretchability; in another implementation, only the third display The area 133 is made of flexible material, and the first display area 131 and the second display area 132 are made of non-flexible material.
在一种可选的实现方式中,终端100的连接组件43采用手动结构。用户手动分离第一壳体41和第二壳体42时,终端100由折叠状态变为展开状态;用户手动合拢第一壳体41和第二壳体42时,终端100由展开状态变为折叠状态。In an optional implementation manner, the connection component 43 of the terminal 100 adopts a manual structure. When the user manually separates the first casing 41 and the second casing 42, the terminal 100 changes from the folded state to the unfolded state; when the user manually closes the first casing 41 and the second casing 42, the terminal 100 changes from the unfolded state to the folded state. state.
在另一种可选的实现方式中,终端100的连接组件43采用电动结构,比如,连接组件43中设置有电动马达一类的电动旋转部件。在电动旋转部件的带动下,第一壳体41和第二壳体42自动实现合拢或分离,从而使终端100具备展开和折叠两种状态。In another optional implementation manner, the connection assembly 43 of the terminal 100 adopts an electric structure, for example, the connection assembly 43 is provided with an electric rotating component such as an electric motor. Driven by the electric rotating part, the first housing 41 and the second housing 42 are automatically closed or separated, so that the terminal 100 has two states of unfolding and folding.
按照折叠状态下触摸显示屏是否外露进行划分,终端100可以被划分为外折叠屏终端和内折叠屏终端。其中:According to whether the touch display screen is exposed in the folded state, the terminal 100 can be divided into an outer folding screen terminal and an inner folding screen terminal. in:
外折叠屏终端External folding screen terminal
外折叠屏终端是指可折叠角度为180°,且在折叠状态下,触摸显示屏全部外露的终端。如图3所示,终端100为外折叠屏终端。展开状态下,终端100的第一壳体41的第一支撑面与第二壳体42的第二支撑面相齐平(即夹角为180°),且触摸显示屏的第一显示区域131、第二显示区域132和第三显示区域133位于同一平面;终端100由展开状态变为折叠状态过程中,如图3所示,第一壳体41的第一背面与第二壳体42的第二背面相靠拢,第一支撑面与第二支撑面的夹角由180°变为0°;折叠状态下,如图4所示,终端100的第一壳体41的第一支撑面与第二壳体42的第二支撑面相平行(第一壳体41与第二壳体42的夹角为0°),使得触摸显示屏处于U型折叠状态,其中,触摸显示屏的第三显示区域133形成外露的U型弧面。可选地,在本发明实施例的应用场景中,用户A可以面对终端的第一显示区域131,用户B可以面对终端的第二显示区域132。An external folding screen terminal refers to a terminal that can be folded at an angle of 180°, and in the folded state, the entire touch screen is exposed. As shown in FIG. 3 , the terminal 100 is an external folding screen terminal. In the unfolded state, the first supporting surface of the first housing 41 of the terminal 100 is flush with the second supporting surface of the second housing 42 (that is, the included angle is 180°), and the first display area 131, The second display area 132 and the third display area 133 are located on the same plane; when the terminal 100 changes from the unfolded state to the folded state, as shown in FIG. The two backs are close together, and the angle between the first support surface and the second support surface changes from 180° to 0°; in the folded state, as shown in FIG. 4 , the first support surface and the second support surface of the first housing 41 of the terminal 100 The second supporting surfaces of the two housings 42 are parallel (the angle between the first housing 41 and the second housing 42 is 0°), so that the touch screen is in a U-shaped folded state, wherein the third display area of the touch screen 133 forms an exposed U-shaped arc surface. Optionally, in the application scenario of the embodiment of the present invention, user A may face the first display area 131 of the terminal, and user B may face the second display area 132 of the terminal.
在一种可选的实现方式中,在折叠状态下,触摸显示屏的全部或部分显示区域用于显示用户界面。比如,如图4所示,折叠状态下,仅第二显示区域132用于显示用户界面,或,仅第三显示区域133用于显示用户界面。In an optional implementation manner, in the folded state, all or part of the display area of the touch display screen is used to display a user interface. For example, as shown in FIG. 4 , in the folded state, only the second display area 132 is used to display the user interface, or only the third display area 133 is used to display the user interface.
在其他可能的实现方式中,终端100的可折叠角度还可以为360°(既可以内折也可以外折),且在折叠状态下,触摸显示屏外露或内敛的终端,本实施例对此不加以限定。In other possible implementations, the foldable angle of the terminal 100 can also be 360° (it can be folded inward or outward), and in the folded state, the touch screen is exposed or restrained. Not limited.
图3或图4所示的终端100中,第一壳体41和第二壳体42尺寸相同或相近,终端100的折叠方式被称为对称折叠。在其他可能的实现方式中,终端100的折叠方式还可以为非对称折叠。采用非对称折叠时,第一壳体41和第二壳体42的尺寸可以不同或尺寸相差大于阈值(比如50%或60%或70%),相应的,触摸显示屏中第一显示区域131的面积与第二显示区域132的面积相差大于阈值。In the terminal 100 shown in FIG. 3 or FIG. 4 , the first housing 41 and the second housing 42 have the same or similar dimensions, and the folding method of the terminal 100 is called symmetrical folding. In other possible implementation manners, the folding manner of the terminal 100 may also be asymmetric folding. When using asymmetric folding, the size of the first housing 41 and the second housing 42 can be different or the size difference is greater than a threshold (such as 50% or 60% or 70%), correspondingly, the first display area 131 in the touch screen The difference between the area of and the area of the second display region 132 is greater than the threshold.
示意性的,如图5所示,终端100为非对称折叠的外折叠屏终端,第一壳体41的尺寸大于第二壳体42的尺寸。折叠状态下,第一显示区域131的面积大于第二显示区域132的面积。Schematically, as shown in FIG. 5 , the terminal 100 is an asymmetrically folded outer folding screen terminal, and the size of the first casing 41 is larger than that of the second casing 42 . In the folded state, the area of the first display area 131 is larger than the area of the second display area 132 .
图3至5中,仅以终端100包含两部分壳体以及一个用于连接壳体的连接组件为例进行示意性说明(终端为两折结构),在另一些可能的实现方式中,终端100可以包含n部分壳体以及n-1个连接组件,相应的,终端100的触摸显示屏中包含2n-1块显示区域,与连接组件对应的n-1块显示区域采用柔性材料制成,从而实现n折结构的终端,本实施例对此不加以限定。In FIGS. 3 to 5, the terminal 100 includes two shells and a connection assembly for connecting the shells as an example for schematic illustration (the terminal is a two-fold structure). In other possible implementations, the terminal 100 It may include n parts of the housing and n-1 connecting components. Correspondingly, the touch display screen of the terminal 100 includes 2n-1 display areas, and the n-1 display areas corresponding to the connecting components are made of flexible materials, so that A terminal with an n-fold structure is not limited in this embodiment.
终端100中还设置有至少一种其他部件,该至少一种其他部件包括:摄像头、指纹传感器、接近光传感器、距离传感器等。在一些实施例中,至少一种其他部件设置在终端100的正面、侧边或背面,比如将指纹传感器设置在壳体的背面或侧边、将摄像头设置在触摸显示屏130的上方。At least one other component is also provided in the terminal 100, and the at least one other component includes: a camera, a fingerprint sensor, a proximity light sensor, a distance sensor, and the like. In some embodiments, at least one other component is disposed on the front, side or back of the terminal 100 , such as disposing the fingerprint sensor on the back or side of the housing, and disposing the camera above the touch display 130 .
在另一些实施例中,至少一种其他部件可以集成在触摸显示屏130的内部或下层。在一些实施例中,将骨传导式的听筒设置在终端100的内部;将传统终端的前面板上的其他部件集成在触摸显示屏130的全部区域或部分区域中,比如将摄像头中的感光元件拆分为多个感光像素后,将每个感光像素集成在触摸显示屏130中每个显示像素中的黑色区域中,使得触摸显示屏130具备图像采集功能。由于将至少一种其他部件集成在了触摸显示屏130的内部或下层,因此终端100具有更高的屏占比。In other embodiments, at least one other component may be integrated inside or under the touch display screen 130 . In some embodiments, a bone conduction earpiece is placed inside the terminal 100; other components on the front panel of a traditional terminal are integrated into all or part of the area of the touch display 130, for example, the photosensitive element in the camera After splitting into a plurality of photosensitive pixels, each photosensitive pixel is integrated in the black area of each display pixel in the touch display screen 130, so that the touch display screen 130 has an image acquisition function. Since at least one other component is integrated inside or under the touch display screen 130, the terminal 100 has a higher screen-to-body ratio.
在一些可选的实施例中,终端100的中框的单个侧边,或两个侧边(比如左、右两个侧边),或四个侧边(比如上、下、左、右四个侧边)上设置有边缘触控传感器,该边缘触控传感器用于检测用户在中框上的触摸操作、点击操作、按压操作和滑动操作等中的至少一种操作。该边缘触控传感器可以是触摸传感器、热力传感器、压力传感器等中的任意一种。用户可以在边缘触控传感器上施加操作,对终端100中的应用程序进行控制。In some optional embodiments, a single side of the middle frame of the terminal 100, or two sides (such as the left and right sides), or four sides (such as the upper, lower, left, and right sides) An edge touch sensor is arranged on two sides), and the edge touch sensor is used to detect at least one of the user's touch operation, click operation, press operation and slide operation on the middle frame. The edge touch sensor may be any one of a touch sensor, a thermal sensor, a pressure sensor, and the like. The user can perform operations on the edge touch sensor to control the application programs in the terminal 100 .
除此之外,本领域技术人员可以理解,上述附图所示出的终端100的结构并不构成对终端100的限定,终端可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,终端100中还包括射频电路、输入单元、传感器、音频电路、无线保真(Wireless Fidelity,WiFi)模块、电源、蓝牙模块等部件,在此不再赘述。In addition, those skilled in the art can understand that the structure of the terminal 100 shown in the above drawings does not constitute a limitation on the terminal 100, and the terminal may include more or less components than those shown in the figure, or combine some components, or different component arrangements. For example, the terminal 100 also includes components such as a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (Wireless Fidelity, WiFi) module, a power supply, and a Bluetooth module, which will not be repeated here.
请参考图6,其示出了本发明的一个示例性实施例提供的一种显示文本的方法的流程图,该方法可以应用于如图3、图4或者图5所示的外折叠屏终端中。如图6所示,该显示文本的方法可以包括:Please refer to FIG. 6 , which shows a flow chart of a method for displaying text provided by an exemplary embodiment of the present invention. This method can be applied to an outer folding screen terminal as shown in FIG. 3 , FIG. 4 or FIG. 5 middle. As shown in Figure 6, the method for displaying text may include:
步骤601,获取在第一显示区域中,以第一预设语言输入的第一原文本。Step 601, acquire the first original text input in the first preset language in the first display area.
在本发明实施例中,终端可以是外折叠屏终端,该终端的折叠屏在弯折时,位于第一壳体中的第一显示区域和位于第二壳体中的第二显示区域可以分别供两个用户查看。终端可以首先启用翻译应用程序,该翻译应用程序可以是终端出厂时自带的应用程序,也可以是用户通过网络在第三方应用市场(应用商店)下载并安装的应用程序。可选地,该应用程序既可以是通过安装文件安装在终端本地中的应用程序,也可以是通过web网页展示的网页形式的应用程序。In the embodiment of the present invention, the terminal may be an external folding screen terminal. When the folding screen of the terminal is bent, the first display area in the first housing and the second display area in the second housing may be respectively Viewable by two users. The terminal can first enable a translation application, and the translation application can be a built-in application when the terminal leaves the factory, or an application downloaded and installed by a user in a third-party application market (application store) through the network. Optionally, the application program can be an application program installed locally in the terminal through an installation file, or an application program in the form of a web page displayed through a web page.
可选地,终端可以通过位于第一显示区域中的触摸显示屏或者麦克风获取第一原文本,且该第一原文本是通过第一预设语言输入的。当终端通过触摸显示屏获取第一原文本时,终端可以展示一个输入界面,令用户使用第一预设语言输入第一原文本。当终端通过麦克获取第一原文本时,终端可以通过麦克风采集用户针对第一显示区域使用第一预设语言发出的第一语音,并将第一语音识别成为第一原文本。需要说明的是,当终端通过麦克风接收第一语音时,麦克风可以安装在第一显示区域所在的第一壳体中,该麦克风可以是定向麦克风,能够将正对第一显示区域产生的语音确认为第一语音。Optionally, the terminal may obtain the first original text through a touch screen or a microphone located in the first display area, and the first original text is input in the first preset language. When the terminal obtains the first original text by touching the display screen, the terminal may display an input interface to allow the user to input the first original text in the first preset language. When the terminal obtains the first original text through the microphone, the terminal may collect the first voice uttered by the user in the first preset language for the first display area through the microphone, and recognize the first voice into the first original text. It should be noted that when the terminal receives the first voice through the microphone, the microphone may be installed in the first casing where the first display area is located, and the microphone may be a directional microphone, which can confirm the voice generated directly facing the first display area. for the first voice.
步骤602,翻译第一原文本,获得第一译文本,第一译文本是与第二预设语言相对应的文本。Step 602: Translate the first original text to obtain a first translated text, where the first translated text is a text corresponding to the second preset language.
在本发明实施例中,终端在获取第一原文本后,为了该第一原文本的语义能够被使用第二预设语言的另外的用户所获知,终端需要将该第一原文本翻译为第一译文本。终端可以通过本地存储的翻译进程来翻译,也可以通过网络在线的方式进行翻译,本发明实施例对此不作限定。In the embodiment of the present invention, after the terminal obtains the first original text, in order to make the semantics of the first original text known to other users using the second preset language, the terminal needs to translate the first original text into the second One translated text. The terminal may perform translation through a locally stored translation process, or through a network online mode, which is not limited in this embodiment of the present invention.
步骤603,在第一显示区域中显示第一原文本,并在第二显示区域中显示第一译文本。Step 603, display the first original text in the first display area, and display the first translated text in the second display area.
在本发明实施例中,终端在第一显示区域中显示第一原文本,并在第二显示区域中显示第一译文本。例如,在终端的姿态是形如图3所示的折叠状态时,第一显示区域中显示第一原文本,并在第二显示区域中显示第一译文本。In this embodiment of the present invention, the terminal displays the first original text in the first display area, and displays the first translated text in the second display area. For example, when the posture of the terminal is in the folded state as shown in FIG. 3 , the first original text is displayed in the first display area, and the first translated text is displayed in the second display area.
综上所述,本发明实施例提供的一种显示文本的方法,终端通过获取在第一显示区域中,以第一预设语言输入的第一原文本,并翻译该第一原文本,获得第一译文本,该第一译文本是与第二预设语言相对应的文本,在第一显示区域中显示第一原文本,并在第二显示区域中显示第一译文本。由于可折叠显示屏能够在弯折时方便地令第一显示区域和第二显示区域分别正对两个不同的方向,因此,使用第一预设语言的用户可以在第一显示区域中查看自己输入的第一原文本,使用第二预设语言的用户可以在第二显示区域中查看由第一原文本翻译来的第一译文本,避免了单一显示区域的终端在显示翻译结果时需要在两个用户之间交替查看,减少了用户操作,提高了翻译结果的显示效果。To sum up, in the method for displaying text provided by the embodiment of the present invention, the terminal acquires the first original text input in the first preset language in the first display area and translates the first original text to obtain The first translated text, the first translated text is text corresponding to the second preset language, the first original text is displayed in the first display area, and the first translated text is displayed in the second display area. Since the foldable display can conveniently make the first display area and the second display area face two different directions when it is bent, users who use the first preset language can view their own screen in the first display area. For the first original text input, users using the second preset language can view the first translated text translated from the first original text in the second display area, which avoids the need for a terminal in a single display area to display translation results Alternate viewing between two users reduces user operations and improves the display effect of translation results.
请参考图7,其示出了本发明的一个示例性实施例提供的另一种显示文本的方法的流程图,该方法可以应用于如图3、图4或者图5所示的外折叠屏终端中。如图6所示,该显示文本的方法可以包括:Please refer to FIG. 7 , which shows a flow chart of another method for displaying text provided by an exemplary embodiment of the present invention. This method can be applied to the outer folding screen as shown in FIG. 3 , FIG. 4 or FIG. 5 in the terminal. As shown in Figure 6, the method for displaying text may include:
步骤701,获取在第一显示区域中,以第一预设语言输入的第一原文本。Step 701, acquire the first original text input in the first preset language in the first display area.
需要说明的是,步骤701执行的获取在第一显示区域中以第一预设语言输入的第一原文本的实现过程和步骤601的实现过程相同,详情请参见步骤601,此处不再赘述。It should be noted that the implementation process of obtaining the first original text input in the first preset language in the first display area in step 701 is the same as the implementation process of step 601, please refer to step 601 for details, and will not be repeated here. .
步骤702,翻译第一原文本,获得第一译文本,第一译文本是与第二预设语言相对应的文本。Step 702: Translate the first original text to obtain a first translated text, where the first translated text is a text corresponding to the second preset language.
其中,步骤702的现实过程和步骤602的实现过程相同,详情请参见步骤602,此处不再赘述。Wherein, the actual process of step 702 is the same as the implementation process of step 602, please refer to step 602 for details, and will not be repeated here.
步骤703,检测终端是否处于折叠状态。Step 703, detecting whether the terminal is in a folded state.
在本发明实施例中,终端将检测显示屏是否处于折叠状态,该折叠状态指第一壳体与第二壳体不处于同一水平面的任意一种折叠姿态,即第一壳体与第二壳体之间的可折叠角度是不等于180°且属于[0°,360°]的任意一个角度值。对应的,展开状态指第一壳体与第二壳体处于同一水平面的姿态。In the embodiment of the present invention, the terminal will detect whether the display screen is in a folded state. The folded state refers to any folding posture in which the first shell and the second shell are not on the same horizontal plane, that is, the first shell and the second shell The foldable angle between bodies is any angle value not equal to 180° and belonging to [0°, 360°]. Correspondingly, the unfolded state refers to a posture in which the first casing and the second casing are on the same horizontal plane.
步骤704,若终端处于折叠状态,则在第一显示区域中显示第一原文本,并在第二显示区域中显示第一译文本。Step 704: If the terminal is in the folded state, display the first original text in the first display area, and display the first translated text in the second display area.
其中,步骤704的现实过程和步骤603的实现过程相同,详情请参见步骤603,此处不再赘述。Wherein, the actual process of step 704 is the same as the implementation process of step 603, please refer to step 603 for details, and will not be repeated here.
步骤705,当终端由折叠状态切换为展开状态时,将第一译文本和第一原文本聚合显示在第一显示区域的同一条对话中。Step 705, when the terminal switches from the folded state to the unfolded state, aggregate and display the first translated text and the first original text in the same dialog in the first display area.
请参见图8、图9和图10,图8是基于图7所示实施例提供的一种折叠状态下的第一显示区域的界面图。图9是基于图7所示实施例提供的一种折叠状态下的第二显示区域的界面图。图10是基于图7所示实施例提供的一种展开状态下的界面图。Please refer to FIG. 8 , FIG. 9 and FIG. 10 . FIG. 8 is an interface diagram of the first display area in a folded state provided based on the embodiment shown in FIG. 7 . FIG. 9 is an interface diagram of a second display area in a folded state provided based on the embodiment shown in FIG. 7 . Fig. 10 is an interface diagram in an unfolded state provided based on the embodiment shown in Fig. 7 .
在本发明实施例提供的显示文本的方法中,终端在折叠状态下分别如图8和图9中的界面显示第一原文本和第一译文本。例如,当用户A针对第一显示区域用汉语(第一预设语言)说出“请问我要去时代广场该怎么走?”,图8中的第一显示区域131将在一条对话中显示第一原文本“请问我要去时代广场该怎么走?”,并在该终端中的第二显示区域132的一条对话中显示第一译文本“How can I get the Times Square?”。此时,使用英语(第二预设语言)的用户B可以在第二显示区域中查看到第一译文本,以便进行回应。用户B此时可以面对第二显示区域132用英语说出第二原文本“Turn right ahead and go straight to thesecond crossing.”相应的,终端将在第一显示区域131中对应显示第二译文本“从前面右转然后直走到第二个路口”。随后用户A和用户B还可以进行“好的,谢谢您”(Well,thankyou.),“You are welcome.”(不客气)等语句交流。In the method for displaying text provided by the embodiment of the present invention, the terminal displays the first original text and the first translated text in the interface shown in FIG. 8 and FIG. 9 respectively in the folded state. For example, when user A speaks "How can I go to Times Square?" in Chinese (the first preset language) for the first display area, the first display area 131 in FIG. An original text "How can I get to Times Square?", and display the first translated text "How can I get the Times Square?" in a dialogue in the second display area 132 of the terminal. At this time, user B who uses English (the second default language) can view the first translated text in the second display area in order to respond. At this time, user B can face the second display area 132 and say the second original text in English, "Turn right ahead and go straight to the second crossing." Correspondingly, the terminal will display the second translated text in the first display area 131 "Turn right from the front and go straight to the second intersection". Subsequently, user A and user B can also exchange sentences such as "Well, thank you." (Well, thank you.), "You are welcome." (You are welcome).
可选地,由于第一译文本是通过第二显示区域显示的文本,该文本可以在第一原文本长度较长时,逐句实时地显示在第二显示区域中,以节省用户A和用户B的交流时间。Optionally, since the first translated text is displayed in the second display area, the text can be displayed in the second display area sentence by sentence in real time when the length of the first original text is relatively long, so as to save user A and user B's communication time.
在一种可能出现的终端的使用场景中,当终端的姿态由折叠状态转变为展开状态时,第一显示区域131和第二显示区域132中显示的内容将发生改变。此时终端将如图10所示的界面显示文本,为了实现如图10的显示效果,终端将执行下述步骤1)和步骤2)。In a possible usage scenario of the terminal, when the posture of the terminal changes from the folded state to the unfolded state, the content displayed in the first display area 131 and the second display area 132 will change. At this time, the terminal will display the text on the interface as shown in FIG. 10 . In order to realize the display effect as shown in FIG. 10 , the terminal will perform the following steps 1) and 2).
1)获取第一译文本和第一原文本各自的显示参数,显示参数包括在所属对话中的位置、字体或字号中至少一种。1) Obtain display parameters of the first translated text and the first original text, where the display parameters include at least one of position, font, or font size in the associated dialog.
在确定终端的姿态由折叠状态转为展开状态时,将获取第一译文本和第二原文本各自的显示参数,以第一译文本是图9中显示的“How can I get the Times Square?”为例,相应的第一原文本是图10中显示的“请问我要去时代广场该怎么走?”。终端将分别获取上述第一译文本和第一原文本的显示参数。其中,显示参数可以是第一译文本和第一原文本融合显示为一条对话时各自的位置、字体或者字号中至少一种。When it is determined that the posture of the terminal changes from the folded state to the unfolded state, the respective display parameters of the first translated text and the second original text will be obtained, and the first translated text is "How can I get the Times Square?" shown in FIG. 9 ? " as an example, the corresponding first original text is "how can I go to Times Square?" shown in Figure 10. The terminal will obtain the display parameters of the first translated text and the first original text respectively. Wherein, the display parameter may be at least one of position, font or font size when the first translated text and the first original text are merged and displayed as a dialogue.
2)根据显示参数,在同一条对话中显示第一译文本和第一原文本。2) According to the display parameters, display the first translated text and the first original text in the same dialog.
终端获取了显示参数后,将在同一条对话中显示第一译文本和第一原文本。其中,显示界面是可以如图10所示的显示界面。在显示界面1000中,将第一原文本1010和第一译文本1020在同一条对话中显示。其中,在同一条对话中,第一译文本1020可以在第一原文本1010上端的显示区域中显示,并以比第一原文本的字号较大的字号显示。After obtaining the display parameters, the terminal will display the first translated text and the first original text in the same dialog. Wherein, the display interface may be a display interface as shown in FIG. 10 . In the display interface 1000, the first original text 1010 and the first translated text 1020 are displayed in the same dialog. Wherein, in the same conversation, the first translated text 1020 may be displayed in the display area at the top of the first original text 1010, and displayed in a font size larger than that of the first original text.
步骤706,当终端由展开状态切换为折叠状态时,在第一显示区域中显示第一原文本,并在第二显示区域显示第一译文本。Step 706, when the terminal switches from the expanded state to the folded state, display the first original text in the first display area, and display the first translated text in the second display area.
相应的,当终端由展开状态切换为折叠状态时,终端的显示界面可以如图10所示的显示界面恢复显示为图8所示的第一显示区域的显示界面和图9所示的第二显示区域的显示界面。Correspondingly, when the terminal is switched from the unfolded state to the folded state, the display interface of the terminal can resume displaying the display interface of the first display area shown in FIG. 8 and the second display interface shown in FIG. 9 as shown in FIG. The display interface of the display area.
需要说明的是,在上述显示文本的过程中,终端可以通过接收第一信号并根据第一信号在第二显示区域中显示第一原文本,在第二显示区域中显示第一译文本。其中,第一信号是根据切换屏幕操作生成的信号,切换屏幕操作用于指示第一显示区域和第二显示区域互换显示内容。可选地,第一信号具体可以是根据在折叠显示屏中的换屏按钮上执行的第一指定操作生成的信号,或者,是根据在折叠显示屏上执行的第二指定操作生成的信号,第二指定操作是折叠屏终端能够识别的预设手势。在折叠显示屏中显示一个换屏按钮,该换屏按钮可以是虚拟按钮。当用户在该换屏按钮上执行第一指定操作时,终端将接收第一信号。例如,终端可以仅在第一显示区域中显示一个换屏按钮,也可以在仅在第二显示区域中显示一个换屏按钮,或者,还可以在第一显示区域和第二显示区域分别显示一个换屏按钮。可选地,第一信号也可以是用户在折叠显示屏执行的第二指定操作生成的信号。该第二指定操作可以是滑动操作、长按操作、多触控点操作等用户能够完成触控操作。It should be noted that, in the above process of displaying the text, the terminal may display the first translated text in the second display area by receiving the first signal and displaying the first original text in the second display area according to the first signal. Wherein, the first signal is a signal generated according to the screen switching operation, and the screen switching operation is used to instruct the first display area and the second display area to exchange display content. Optionally, the first signal may specifically be a signal generated according to a first specified operation performed on the screen change button in the foldable display screen, or a signal generated according to a second specified operation performed on the foldable display screen, The second specified operation is a preset gesture that can be recognized by the folding screen terminal. A screen-changing button is displayed on the folding display, and the screen-changing button may be a virtual button. When the user performs a first designated operation on the screen changing button, the terminal will receive a first signal. For example, the terminal may display only one screen-changing button in the first display area, or display only one screen-changing button in the second display area, or may also display a screen-changing button in the first display area and the second display area respectively. Change screen button. Optionally, the first signal may also be a signal generated by a second designated operation performed by the user on the folding display screen. The second designated operation may be a touch operation that the user can complete, such as a slide operation, a long press operation, and a multi-touch point operation.
相应的,终端在接收第一信号后,将根据该第一信号在第二显示区域中显示第一原文本。可选地,与此同时在第一显示区域中显示第一译文本。通过本步骤完成了第一显示区域和第二显示区域中显示内容的互换。Correspondingly, after receiving the first signal, the terminal will display the first original text in the second display area according to the first signal. Optionally, at the same time, the first translated text is displayed in the first display area. Through this step, the exchange of display contents in the first display area and the second display area is completed.
进一步的,在本发明实施例提供的显示文本的一种可能的应用场景中,使用第一预设语言的用户和使用第二预设语言的用户可能会进行交流,此时,终端将接收在第二显示区域中,以第二预设语言输入的第二原文本,并翻译第二原文本获得第二译文本,该第二译文本是与第一预设语言相对应的文本。在第二显示区域中显示第二原文本,并在第一显示区域中显示第二译文本。Further, in a possible application scenario of displaying text provided by the embodiment of the present invention, users who use the first preset language may communicate with users who use the second preset language. At this time, the terminal will receive the In the second display area, the second original text is input in the second preset language, and the second original text is translated to obtain a second translated text, and the second translated text is a text corresponding to the first preset language. The second original text is displayed in the second display area, and the second translated text is displayed in the first display area.
综上所述,本发明实施例提供的显示文本的方法,通过检测终端是否处于折叠状态,当终端处于折叠状态,获取在第一显示区域中,以第一预设语言输入的第一原文本,翻译第一原文本,获得第一译文本,第一译文本是与第二预设语言相对应的文本,当终端由折叠状态切换为展开状态时,将第一译文本和第一原文本聚合显示在第一显示区域的同一条对话中,使得折叠屏终端能够在折叠状态转为展开状态时融合翻译前后的第一原文本和对应的第一译文本,提高了终端的折叠屏在展开状态下显示翻译前后文本的显示效果。To sum up, the method for displaying text provided by the embodiment of the present invention detects whether the terminal is in the folded state, and when the terminal is in the folded state, acquires the first original text input in the first preset language in the first display area , translate the first original text to obtain the first translated text. The first translated text is the text corresponding to the second preset language. When the terminal switches from the folded state to the expanded state, the first translated text and the first original text Aggregation is displayed in the same dialog in the first display area, so that the foldable screen terminal can fuse the first original text before and after translation with the corresponding first translated text when the folded state changes to the unfolded state, which improves the folding screen of the terminal. In the state, the display effect of the text before and after translation is displayed.
另外,通过获取第一译文本和第一原文本各自的显示参数,根据显示参数,在同一条对话中显示第一译文本和第一原文本,其中,显示参数包括在所属对话中的位置、字体或字号中至少一种。通过终端的折叠屏在展开状态下第一译文本与第一原文本在同一条对话中不同的显示效果,可以将其中译文本突出显示,提高了展开界面突出显示第一译文本的效果。In addition, by acquiring the respective display parameters of the first translated text and the first original text, the first translated text and the first original text are displayed in the same dialog according to the display parameters, wherein the display parameters include the position, At least one of font or font size. Through the different display effects of the first translated text and the first original text in the same dialogue when the folding screen of the terminal is unfolded, the translated text can be highlighted, which improves the effect of highlighting the first translated text on the unfolded interface.
另外,在终端由展开状态切换为折叠状态时,在第一显示区域中显示第一原文本,并在第二显示区域显示第一译文本,实现了终端的文本显示效果随着折叠屏姿态变化的效果。In addition, when the terminal switches from the expanded state to the folded state, the first original text is displayed in the first display area, and the first translated text is displayed in the second display area, so that the text display effect of the terminal changes with the posture of the folding screen Effect.
下述为本发明装置实施例,可以用于执行本发明方法实施例。对于本发明装置实施例中未披露的细节,请参照本发明方法实施例。The following are device embodiments of the present invention, which can be used to implement the method embodiments of the present invention. For the details not disclosed in the device embodiment of the present invention, please refer to the method embodiment of the present invention.
请参考图11,其是本发明一个实施例提供的一种显示文本的装置的结构方框图,该界面展示装置可通过软件、硬件或者两者的结合实现成为如图3、图4或图5所示的折叠屏终端的部分或者全部。该界面展示装置可以包括:Please refer to Figure 11, which is a structural block diagram of a device for displaying text provided by an embodiment of the present invention, the interface display device can be implemented as shown in Figure 3, Figure 4 or Figure 5 through software, hardware or a combination of both Part or all of the displayed folding screen terminal. The interface display device may include:
获取模块1101,用于获取在第一显示区域中,以第一预设语言输入的第一原文本;An acquisition module 1101, configured to acquire the first original text input in the first preset language in the first display area;
翻译模块1102,用于翻译第一原文本,获得第一译文本,第一译文本是与第二预设语言相对应的文本;The translation module 1102 is configured to translate the first original text and obtain a first translated text, where the first translated text is a text corresponding to the second preset language;
显示模块1103,用于在第一显示区域中显示第一原文本,并在第二显示区域中显示第一译文本。A display module 1103, configured to display the first original text in the first display area, and display the first translated text in the second display area.
可选地,装置还包括:Optionally, the device also includes:
检测模块,用于检测终端是否处于折叠状态;A detection module, configured to detect whether the terminal is in a folded state;
获取模块,具体用于在终端处于折叠状态时,获取在第一显示区域中,以第一预设语言输入的第一原文本。The acquiring module is specifically configured to acquire the first original text input in the first preset language in the first display area when the terminal is in the folded state.
可选地,装置还包括:Optionally, the device also includes:
聚合模块,用于在终端由折叠状态切换为展开状态时,将第一译文本和第一原文本聚合显示在第一显示区域的同一条对话中。The aggregating module is configured to aggregate and display the first translated text and the first original text in the same dialog in the first display area when the terminal is switched from the folded state to the unfolded state.
可选地,聚合模块包括:Optionally, the aggregation module includes:
获取单元,用于获取第一译文本和第一原文本各自的显示参数,显示参数包括在所属对话中的位置、字体或字号中至少一种;An acquisition unit, configured to acquire respective display parameters of the first translated text and the first original text, where the display parameters include at least one of position, font, or font size in the associated dialog;
显示单元,用于根据显示参数,在同一条对话中显示第一译文本和第一原文本。The display unit is used to display the first translated text and the first original text in the same dialog according to the display parameters.
可选地,显示模块,具体用于当终端由展开状态切换为折叠状态时,在第一显示区域中显示第一原文本,并在第二显示区域显示第一译文本。Optionally, the display module is specifically configured to display the first original text in the first display area and display the first translated text in the second display area when the terminal switches from the unfolded state to the folded state.
可选地,获取模块包括:Optionally, the acquisition module includes:
接收单元,用于接收第一信号,第一信号是根据切换屏幕操作生成的信号,切换屏幕操作用于指示第一显示区域和第二显示区域互换显示内容;The receiving unit is configured to receive a first signal, the first signal is a signal generated according to the switching screen operation, and the switching screen operation is used to instruct the first display area and the second display area to exchange display content;
显示单元,用于根据第一信号,在第二显示区域中显示第一原文本,在第二显示区域中显示第一译文本。The display unit is configured to display the first original text in the second display area and display the first translated text in the second display area according to the first signal.
可选地,装置还包括:Optionally, the device also includes:
接收模块,用于接收在第二显示区域中,以第二预设语言输入的第二原文本。The receiving module is configured to receive the second original text input in the second preset language in the second display area.
翻译模块,还用于翻译第二原文本,获得第二译文本,第二译文本是与第一预设语言相对应的文本;The translation module is also used to translate the second original text to obtain a second translated text, where the second translated text is a text corresponding to the first preset language;
显示模块,还用于在第二显示区域中显示第二原文本,并在第一显示区域中显示第一译文本。The display module is also used to display the second original text in the second display area, and display the first translated text in the first display area.
相关细节参见上述方法实施例。For relevant details, refer to the foregoing method embodiments.
本发明实施例还提供一种计算机可读介质,其上存储有程序指令,程序指令被终端的处理器执行时实现上述如图6或图7所示的方法实施例中的显示文本的方法。The embodiment of the present invention also provides a computer-readable medium on which program instructions are stored. When the program instructions are executed by the processor of the terminal, the above-mentioned method for displaying text in the method embodiment shown in FIG. 6 or FIG. 7 is implemented.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware, and can also be completed by instructing related hardware through a program. The program can be stored in a computer-readable storage medium. The above-mentioned The storage medium mentioned may be a read-only memory, a magnetic disk or an optical disk, and the like.
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。The above descriptions are only preferred embodiments of the application, and are not intended to limit the application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the application shall be included in the protection of the application. within range.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710999109.4ACN107766340A (en) | 2017-10-24 | 2017-10-24 | Method, device and terminal for displaying text |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710999109.4ACN107766340A (en) | 2017-10-24 | 2017-10-24 | Method, device and terminal for displaying text |
| Publication Number | Publication Date |
|---|---|
| CN107766340Atrue CN107766340A (en) | 2018-03-06 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710999109.4APendingCN107766340A (en) | 2017-10-24 | 2017-10-24 | Method, device and terminal for displaying text |
| Country | Link |
|---|---|
| CN (1) | CN107766340A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108664475A (en)* | 2018-03-28 | 2018-10-16 | 广东欧珀移动通信有限公司 | Translate display methods, device, mobile terminal and storage medium |
| CN109960813A (en)* | 2019-03-18 | 2019-07-02 | 维沃移动通信有限公司 | A translation method, mobile terminal and computer-readable storage medium |
| CN111399950A (en)* | 2018-12-28 | 2020-07-10 | 北京搜狗科技发展有限公司 | Voice input interface management method and device and voice input equipment |
| CN111782333A (en)* | 2020-07-28 | 2020-10-16 | 网易(杭州)网络有限公司 | Interface display method and device in game, storage medium and terminal equipment |
| CN112329480A (en)* | 2019-07-19 | 2021-02-05 | 搜狗(杭州)智能科技有限公司 | A regional adjustment method, device and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6024571A (en)* | 1996-04-25 | 2000-02-15 | Renegar; Janet Elaine | Foreign language communication system/device and learning aid |
| US20020173965A1 (en)* | 2001-05-17 | 2002-11-21 | Curry David G. | Interactive conversational speech communicator method and system |
| CN101571854A (en)* | 2009-06-11 | 2009-11-04 | 四川国腾通讯股份有限公司 | System and method for exchange and communication among multinational languages |
| CN101777336B (en)* | 2010-02-09 | 2012-02-22 | 汉王科技股份有限公司 | Double-screen electronic reader-based display method and device |
| CN203773543U (en)* | 2014-04-09 | 2014-08-13 | 陈修志 | Desk type translation device |
| CN106462377A (en)* | 2014-05-02 | 2017-02-22 | 三星电子株式会社 | Method and apparatus for outputting content using multiple displays |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6024571A (en)* | 1996-04-25 | 2000-02-15 | Renegar; Janet Elaine | Foreign language communication system/device and learning aid |
| US20020173965A1 (en)* | 2001-05-17 | 2002-11-21 | Curry David G. | Interactive conversational speech communicator method and system |
| CN101571854A (en)* | 2009-06-11 | 2009-11-04 | 四川国腾通讯股份有限公司 | System and method for exchange and communication among multinational languages |
| CN101777336B (en)* | 2010-02-09 | 2012-02-22 | 汉王科技股份有限公司 | Double-screen electronic reader-based display method and device |
| CN203773543U (en)* | 2014-04-09 | 2014-08-13 | 陈修志 | Desk type translation device |
| CN106462377A (en)* | 2014-05-02 | 2017-02-22 | 三星电子株式会社 | Method and apparatus for outputting content using multiple displays |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108664475A (en)* | 2018-03-28 | 2018-10-16 | 广东欧珀移动通信有限公司 | Translate display methods, device, mobile terminal and storage medium |
| CN111399950A (en)* | 2018-12-28 | 2020-07-10 | 北京搜狗科技发展有限公司 | Voice input interface management method and device and voice input equipment |
| CN111399950B (en)* | 2018-12-28 | 2024-06-11 | 北京搜狗科技发展有限公司 | Voice input interface management method and device and voice input equipment |
| CN109960813A (en)* | 2019-03-18 | 2019-07-02 | 维沃移动通信有限公司 | A translation method, mobile terminal and computer-readable storage medium |
| CN112329480A (en)* | 2019-07-19 | 2021-02-05 | 搜狗(杭州)智能科技有限公司 | A regional adjustment method, device and electronic device |
| CN111782333A (en)* | 2020-07-28 | 2020-10-16 | 网易(杭州)网络有限公司 | Interface display method and device in game, storage medium and terminal equipment |
| CN111782333B (en)* | 2020-07-28 | 2022-05-31 | 网易(杭州)网络有限公司 | Interface display method and device in game, storage medium and terminal equipment |
| Publication | Publication Date | Title |
|---|---|---|
| CN107728901B (en) | Interface display method and device and terminal | |
| CN107704177B (en) | Interface display method and device and terminal | |
| CN107844228B (en) | Message display method, device and terminal | |
| CN107765959B (en) | Background application display method and terminal | |
| CN107870716B (en) | Method and device for calling background application | |
| CN107870724B (en) | Display screen unfolding method and device and terminal | |
| CN108491127B (en) | Input method interface display method, device, terminal and storage medium | |
| CN107807773B (en) | Application body distinguishing method, device, terminal and storage medium | |
| WO2020147666A1 (en) | User interface display method and apparatus, terminal and storage medium | |
| WO2019174546A1 (en) | User interface display method and device, apparatus, and storage medium | |
| CN107678724A (en) | An information display method, device, mobile terminal and storage medium | |
| WO2019114828A1 (en) | User interface display method and apparatus, device, and storage medium | |
| CN107678661A (en) | Method and device for displaying data content | |
| CN107678826B (en) | Interface display method and device, mobile terminal and storage medium | |
| CN107577414A (en) | The method and mobile terminal of split screen display available | |
| CN107809504A (en) | Method, device, terminal and storage medium for displaying information | |
| CN107765971A (en) | User interface display method and device | |
| CN107632874B (en) | Interface display method, device and terminal | |
| CN107765968A (en) | Target switching method, device, terminal and computer-readable recording medium | |
| CN107766340A (en) | Method, device and terminal for displaying text | |
| CN107589903A (en) | Method and device for displaying multi-page display information | |
| CN107728885A (en) | Multi-task control method, device, mobile terminal and storage medium | |
| CN107656578A (en) | terminal control method, device, terminal and storage medium | |
| CN107506123A (en) | Adjustment operation execution method, device and terminal | |
| CN107766023A (en) | Information display method, device, terminal and storage medium |
| 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 | ||
| RJ01 | Rejection of invention patent application after publication | Application publication date:20180306 | |
| RJ01 | Rejection of invention patent application after publication |