CN111966433B - Method, device, storage medium and electronic device for changing language in page - Google Patents
Method, device, storage medium and electronic device for changing language in page Download PDFInfo
- Publication number
- CN111966433B CN111966433B CN202010614351.7A CN202010614351A CN111966433B CN 111966433 B CN111966433 B CN 111966433B CN 202010614351 A CN202010614351 A CN 202010614351A CN 111966433 B CN111966433 B CN 111966433B
- Authority
- CN
- China
- Prior art keywords
- language
- page
- corpus
- changing
- change instruction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 230000008859 change Effects 0.000 claims abstract description 83
- 230000015654 memory Effects 0.000 claims description 19
- 238000013519 translation Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 8
- 238000000605 extraction Methods 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 10
- 238000010586 diagram Methods 0.000 description 24
- 238000007726 management method Methods 0.000 description 15
- 230000006870 function Effects 0.000 description 8
- 230000001052 transient effect Effects 0.000 description 8
- 230000001960 triggered effect Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 4
- 230000008676 import Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 2
- 230000001427 coherent effect Effects 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000001953 sensory effect Effects 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
- G06F9/454—Multi-language systems; Localisation; Internationalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
- G06F40/58—Use of machine translation, e.g. for multi-lingual retrieval, for server-side translation for client devices or for real-time translation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Artificial Intelligence (AREA)
- Machine Translation (AREA)
- Stored Programmes (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本申请公开了页面之中语言的更改方法、装置、存储介质及电子设备,涉及智能云技术领域、软件开发技术领域。具体实现方案为:获取语言更改指令,其中,语言更改指令包括目标语言;获取页面之中的标记语料;将目标语言对应的语言包加载至视图模型对应的模型之中;以及通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面,使得智能云管理控制台的页面语言的更改更为灵活,能够有效地适配多种不同的语言,使得语言的更改能够满足页面展示的个性化需求。
The present application discloses a method, device, storage medium and electronic device for changing the language in a page, and relates to the fields of intelligent cloud technology and software development technology. The specific implementation scheme is: obtaining a language change instruction, wherein the language change instruction includes a target language; obtaining a markup corpus in the page; loading a language package corresponding to the target language into a model corresponding to the view model; and translating the markup corpus through the language package corresponding to the target language, and displaying the translated page through the view corresponding to the view model, so that the page language change of the intelligent cloud management console is more flexible, can effectively adapt to a variety of different languages, and the language change can meet the personalized needs of page display.
Description
技术领域Technical Field
本申请涉及互联网技术领域,具体涉及智能云技术领域、软件开发技术领域,尤其涉及页面之中语言的更改方法、装置、存储介质及电子设备。The present application relates to the field of Internet technology, specifically to the field of intelligent cloud technology and software development technology, and in particular to a method, device, storage medium and electronic device for changing the language in a web page.
背景技术Background Art
在智能云管理控制台的应用场景中,当浏览器和智能云管理控制台的语言环境不同时,或者,将智能云管理控制台切换到其他语言环境时,通常智能云管理控制台的页面上的内容,需要展示成对应的环境语言。例如,浏览器的语言环境为英文,则智能云管理控制台上的组件内容应该同样地以英文进行展示。In the application scenario of the intelligent cloud management console, when the language environment of the browser and the intelligent cloud management console are different, or when the intelligent cloud management console is switched to another language environment, the content on the page of the intelligent cloud management console usually needs to be displayed in the corresponding environment language. For example, if the language environment of the browser is English, the component content on the intelligent cloud management console should also be displayed in English.
发明内容Summary of the invention
提供了一种页面之中语言的更改方法、装置、存储介质、电子设备及计算机程序产品,使得智能云管理控制台的页面语言的更改更为灵活,能够有效地适配多种不同的语言,使得语言的更改能够满足页面展示的个性化需求。A method, device, storage medium, electronic device and computer program product for changing the language in a page are provided, so that the page language of an intelligent cloud management console can be changed more flexibly and can be effectively adapted to a variety of different languages, so that the language change can meet the personalized needs of page display.
根据第一方面,提供了一种页面之中语言的更改方法,包括:获取语言更改指令,其中,所述语言更改指令包括目标语言;获取所述页面之中的标记语料;将所述目标语言对应的语言包加载至视图模型对应的模型之中;以及通过所述目标语言对应的所述语言包对所述标记语料进行翻译,并通过所述视图模型对应的视图展示翻译之后的页面。According to a first aspect, a method for changing the language of a page is provided, comprising: obtaining a language change instruction, wherein the language change instruction includes a target language; obtaining a markup corpus in the page; loading a language package corresponding to the target language into a model corresponding to a view model; and translating the markup corpus through the language package corresponding to the target language, and displaying the translated page through a view corresponding to the view model.
根据第二方面,提供了一种页面之中语言的更改装置,包括:第一获取模块,用于获取语言更改指令,其中,所述语言更改指令包括目标语言;第二获取模块,用于获取所述页面之中的标记语料;加载模块,用于将所述目标语言对应的语言包加载至视图模型对应的模型之中;翻译模块,用于通过所述目标语言对应的所述语言包对所述标记语料进行翻译,并通过所述视图模型对应的视图展示翻译之后的页面。According to a second aspect, a device for changing the language in a page is provided, comprising: a first acquisition module, used to acquire a language change instruction, wherein the language change instruction includes a target language; a second acquisition module, used to acquire a markup corpus in the page; a loading module, used to load a language package corresponding to the target language into a model corresponding to a view model; and a translation module, used to translate the markup corpus through the language package corresponding to the target language, and display the translated page through a view corresponding to the view model.
根据第三方面,提供了一种电子设备,包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行本申请实施例的页面之中语言的更改方法。According to a third aspect, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for changing the language in a page of an embodiment of the present application.
根据第四方面,提出了一种存储有计算机指令的非瞬时计算机可读存储介质,所述计算机指令用于使所述计算机执行本申请实施例公开的页面之中语言的更改方法。According to a fourth aspect, a non-transitory computer-readable storage medium storing computer instructions is proposed, wherein the computer instructions are used to enable the computer to execute the method for changing the language of a page disclosed in an embodiment of the present application.
根据第五方面,提出了一种计算机程序产品,包括计算机程序,当所述计算机程序由处理器执行时实现本申请实施例公开的页面之中语言的更改方法。According to a fifth aspect, a computer program product is proposed, including a computer program, which, when executed by a processor, implements the method for changing the language in a page disclosed in an embodiment of the present application.
根据本申请的技术使得智能云管理控制台的页面语言的更改更为灵活,能够有效地适配多种不同的语言,使得语言的更改能够满足页面展示的个性化需求。According to the technology of the present application, the page language of the intelligent cloud management console can be changed more flexibly and can be effectively adapted to a variety of different languages, so that the language change can meet the personalized needs of page display.
应当理解,本部分所描述的内容并非旨在标识本申请的实施例的关键或重要特征,也不用于限制本申请的范围。本申请的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
附图用于更好地理解本方案,不构成对本申请的限定。其中:The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present application.
图1是根据本申请第一实施例的示意图;FIG1 is a schematic diagram of a first embodiment of the present application;
图2是根据本申请第二实施例的示意图;FIG2 is a schematic diagram of a second embodiment of the present application;
图3为本申请实施例中一页面示意图;FIG3 is a schematic diagram of a page in an embodiment of the present application;
图4为本申请实施例中另一页面示意图;FIG4 is a schematic diagram of another page in an embodiment of the present application;
图5是根据本申请第三实施例的示意图;FIG5 is a schematic diagram of a third embodiment of the present application;
图6为本申请实施例的国际化标记示意图;FIG6 is a schematic diagram of an internationalized mark in an embodiment of the present application;
图7为本申请实施例中一语言包示意图;FIG7 is a schematic diagram of a language package in an embodiment of the present application;
图8为本申请实施例中另一语言包示意图;FIG8 is a schematic diagram of another language package in an embodiment of the present application;
图9为本申请实施例中的应用场景示意图;FIG9 is a schematic diagram of an application scenario in an embodiment of the present application;
图10是根据本申请第四实施例的示意图;FIG10 is a schematic diagram of a fourth embodiment of the present application;
图11是根据本申请第五实施例的示意图;FIG11 is a schematic diagram of a fifth embodiment of the present application;
图12是用来实现本申请实施例的页面之中语言的更改方法的电子设备的框图。FIG. 12 is a block diagram of an electronic device for implementing the method for changing the language of a page in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
以下结合附图对本申请的示范性实施例做出说明,其中包括本申请实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本申请的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
图1是根据本申请第一实施例的示意图。其中,需要说明的是,本实施例的页面之中语言的更改方法的执行主体为页面之中语言的更改装置,该装置可以由软件和/或硬件的方式实现,该装置可以配置在电子设备中,电子设备可以包括但不限于终端、服务器端等。Fig. 1 is a schematic diagram according to the first embodiment of the present application. It should be noted that the execution subject of the method for changing the language in a page of the present embodiment is a device for changing the language in a page, which can be implemented by software and/or hardware, and can be configured in an electronic device, which can include but is not limited to a terminal, a server, etc.
本申请实施例涉及智能云技术领域、软件开发技术领域,其中,本申请实施例中,正是通过基于软件开发技术领域的MVVM架构(Model-View-ViewModel,模型-视图-视图模型的架构)来实现页面之中语言的更改,从而能够获得更快速的语言更改效率,使得页面语言环境的切换更为连贯,避免对视图层面的页面展示造成影响。The embodiments of the present application relate to the fields of intelligent cloud technology and software development technology. In the embodiments of the present application, the language change in the page is achieved through the MVVM architecture (Model-View-ViewModel) based on the field of software development technology, so as to obtain faster language change efficiency, make the switching of the page language environment more coherent, and avoid affecting the page display at the view level.
另外,本申请中的页面可以例如为智能云产品对应的浏览器的页面,该页面可以具体例如为智能云管理控制台的浏览器的页面,其中,智能云管理控制台,是用户通过网络端管理和使用相应的云产品的入口,经由该智能云管理控制台可以辅助用户对其所管理的云产品和服务进行购买、查看、使用等操作。In addition, the page in the present application may be, for example, a page of a browser corresponding to a smart cloud product, and the page may specifically be, for example, a page of a browser of a smart cloud management console, wherein the smart cloud management console is the entry point for users to manage and use corresponding cloud products through the network. The smart cloud management console can assist users in purchasing, viewing, and using the cloud products and services it manages.
由此,当本申请实施例涉及智能云技术领域时,能够实现对智能云产品的浏览器页面之中的语言进行自适应地更改,能够丰富智能云产品的应用功能。Therefore, when the embodiment of the present application relates to the field of intelligent cloud technology, it is possible to adaptively change the language in the browser page of the intelligent cloud product, thereby enriching the application functions of the intelligent cloud product.
如图1所示,该页面之中语言的更改方法可以包括:As shown in FIG. 1 , the method for changing the language in the page may include:
S101:获取语言更改指令,其中,语言更改指令包括目标语言。S101: Acquire a language change instruction, wherein the language change instruction includes a target language.
当本实施例的页面之中语言的更改方法的执行主体为页面之中语言的更改装置时,该页面之中语言的更改装置的软件架构可以具体例如为MVVM架构。When the execution subject of the method for changing the language in a page of this embodiment is a device for changing the language in a page, the software architecture of the device for changing the language in the page may specifically be, for example, an MVVM architecture.
其中,该语言更改指令用于对智能云管理控制台的页面的语言进行更改,该语言更改指令可以具体是用户触发的,或者,也可以是页面之中语言的更改装置主动识别到当前有对页面的语言进行更改的需求时,根据当前对页面的语言进行更改的需求获取得到的,对此不作限制。Among them, the language change instruction is used to change the language of the page of the intelligent cloud management console. The language change instruction can be specifically triggered by the user, or it can be obtained according to the current need to change the language of the page when the language change device in the page actively recognizes that there is a need to change the language of the page. There is no limitation on this.
本申请实施例中,当获取语言更改指令,其中,语言更改指令包括目标语言后,还可以检测当前页面的语言环境支持的语言与目标语言是否相同,若当前页面的语言环境支持的语言与目标语言不相同,则触发执行后续更改语言的步骤,而若当前页面的语言环境支持的语言与目标语言相同,则可以提醒用户当前语言已是目标语言,能够有效节约更改语言所需的运算资源消耗。In an embodiment of the present application, when a language change instruction is obtained, wherein the language change instruction includes a target language, it is also possible to detect whether the language supported by the language environment of the current page is the same as the target language. If the language supported by the language environment of the current page is different from the target language, the subsequent steps of changing the language are triggered. If the language supported by the language environment of the current page is the same as the target language, the user can be reminded that the current language is already the target language, which can effectively save the computing resources required to change the language.
S102:获取页面之中的标记语料。S102: Obtaining the marked corpus in the page.
其中,该标记语料为页面之中,部分的语料或者也可以是全部的语料,语料可以理解为页面中的文本内容,标记语料可以例如为页面中需要以目标语言进行展示的文本内容。The marked corpus may be part of the corpus or the entire corpus in the page. The corpus may be understood as the text content in the page. The marked corpus may be, for example, the text content in the page that needs to be displayed in the target language.
也即是说,本申请实施例中支持对页面中部分的标记语料的语言进行更改,由此,提供了多样化的语言更改功能,使得语言更改方式更为灵活。That is to say, the embodiment of the present application supports changing the language of part of the markup corpus in the page, thereby providing a variety of language change functions, making the language change method more flexible.
S103:将目标语言对应的语言包加载至视图模型对应的模型之中。S103: Loading the language package corresponding to the target language into the model corresponding to the view model.
上述获取语言更改指令,其中,语言更改指令包括目标语言,并获取页面之中的标记语料后,还将目标语言对应的语言包加载至视图模型对应的模型之中。The above-mentioned acquisition of the language change instruction, wherein the language change instruction includes the target language, and after acquiring the markup corpus in the page, the language package corresponding to the target language is also loaded into the model corresponding to the view model.
也即是说,本申请实施例中的页面之中语言的更改方法支持根据自定义的语言包对页面内的语言进行更改,正是由于是支持了根据自定义的语言包对页面内的语言进行更改,由此,使得语言的更改能够满足页面展示的个性化需求。That is to say, the method for changing the language in the page in the embodiment of the present application supports changing the language in the page according to a customized language package. Because it supports changing the language in the page according to a customized language package, the language change can meet the personalized needs of page display.
S104:通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面。S104: Translate the marked corpus using a language package corresponding to the target language, and display the translated page using a view corresponding to the view model.
上述在通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面,可以具体是在翻译之后即通过视图模型对应的视图展示翻译之后的页面,或者,也可以设定展示时间点,在展示时间点上,通过视图模型对应的视图展示翻译之后的页面,对此不作限制。The above-mentioned translation of the marked corpus through the language package corresponding to the target language and displaying the translated page through the view corresponding to the view model can specifically be to display the translated page after the translation, that is, through the view corresponding to the view model, or, a display time point can be set, and at the display time point, the translated page is displayed through the view corresponding to the view model, and there is no limitation to this.
本实施例中,通过获取语言更改指令,其中,语言更改指令包括目标语言,并获取页面之中的标记语料,将目标语言对应的语言包加载至视图模型对应的模型之中,以及通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面,使得智能云管理控制台的页面语言的更改更为灵活,能够有效地适配多种不同的语言,使得语言的更改能够满足页面展示的个性化需求。In this embodiment, by obtaining a language change instruction, wherein the language change instruction includes a target language, and obtaining the markup corpus in the page, loading the language package corresponding to the target language into the model corresponding to the view model, and translating the markup corpus through the language package corresponding to the target language, and displaying the translated page through the view corresponding to the view model, the page language change of the intelligent cloud management console is made more flexible, can effectively adapt to a variety of different languages, and the language change can meet the personalized needs of page display.
图2是根据本申请第二实施例的示意图。FIG. 2 is a schematic diagram of a second embodiment of the present application.
本实施例中,以该页面之中语言的更改方法的执行主体为视图模型进行示例,对此不作限制。In this embodiment, the execution subject of the method for changing the language in the page is taken as the view model for example, and no limitation is imposed on this.
如图2所示,该页面之中语言的更改方法可以包括:As shown in FIG. 2 , the method for changing the language in the page may include:
S201:视图模型获取语言更改指令,其中,语言更改指令包括目标语言。S201: The view model obtains a language change instruction, wherein the language change instruction includes a target language.
当本实施例的页面之中语言的更改方法的执行主体为页面之中语言的更改装置时,该页面之中语言的更改装置的软件架构可以具体例如为MVVM架构。When the execution subject of the method for changing the language in a page of this embodiment is a device for changing the language in a page, the software architecture of the device for changing the language in the page may specifically be, for example, an MVVM architecture.
由此,当执行页面之中语言的更改方法时,可以具体是由视图模型去获取语言更改指令,其中,语言更改指令包括目标语言。Therefore, when executing the method for changing the language in the page, the view model may specifically obtain the language change instruction, wherein the language change instruction includes the target language.
其中,该语言更改指令用于对智能云管理控制台的页面的语言进行更改,该语言更改指令可以具体是用户触发的,或者,也可以是视图模型主动识别到当前有对页面的语言进行更改的需求时,根据当前对页面的语言进行更改的需求获取得到的,对此不作限制。Among them, the language change instruction is used to change the language of the page of the intelligent cloud management console. The language change instruction can be specifically triggered by the user, or it can be obtained according to the current need to change the language of the page when the view model actively recognizes that there is a need to change the language of the page. There is no limitation on this.
而本申请实施例中,视图模型获取语言更改指令,可以是当页面的语言设置状态变化时,视图模型根据变化后的语言设置状态获取语言更改指令;或者视图模型接收用户输入的语言更改指令,由此,本申请实施例中提供了多种输入语言更改指令的入口,能够适配于各种应用场景下的语言更改需求,具有多方位的灵活性。In the embodiment of the present application, the view model obtains the language change instruction. When the language setting state of the page changes, the view model obtains the language change instruction according to the changed language setting state; or the view model receives the language change instruction input by the user. Therefore, the embodiment of the present application provides multiple input language change instruction entries, which can adapt to the language change requirements in various application scenarios and has multi-faceted flexibility.
作为一种示例,参见图3,图3为本申请实施例中一页面示意图,假设页面30中包括一个语言环境选择按钮31【中文】,则当【中文】被触发时,则可以监测到页面的语言设置状态变化,此时,可以确定具有将页面的语言切换为中文的需求,当页面30中其他的语言环境选择按钮被触发时,则可以执行相同的处理逻辑。As an example, refer to Figure 3, which is a schematic diagram of a page in an embodiment of the present application. Assuming that page 30 includes a language environment selection button 31 [Chinese], when [Chinese] is triggered, the language setting state change of the page can be monitored. At this time, it can be determined that there is a need to switch the language of the page to Chinese. When other language environment selection buttons in page 30 are triggered, the same processing logic can be executed.
另外一些实施例中,还可以配置应用程序编程接口去监听页面的语言设置状态是否产生变化,或者,还可以去监听页面的是否产生其他的一些设定事件,而这些设定事件与语言设置状态变化相关联,当监听产生这些设定事件时,也可以关联页面的语言设置状态产生变化,或者,还可以监听页面的统一资源定位符中是否包含设定路径标记,当页面的统一资源定位符包含设定路径标记时,则表明用户当前有手动修改页面语言环境的需求。In some other embodiments, an application programming interface can also be configured to monitor whether the language setting state of the page changes, or to monitor whether other setting events are generated on the page, and these setting events are associated with changes in the language setting state. When monitoring the generation of these setting events, the language setting state of the page can also be associated with changes. Alternatively, it is also possible to monitor whether the uniform resource locator of the page contains a setting path tag. When the uniform resource locator of the page contains a setting path tag, it indicates that the user currently has a need to manually modify the page language environment.
参见图4,图4为本申请实施例中另一页面示意图,页面的统一资源定位符中包含了设定路径标记{locale}41,则表明用户当前有手动修改页面语言环境的需求。Referring to FIG. 4 , FIG. 4 is another schematic diagram of a page in an embodiment of the present application. The uniform resource locator of the page includes a setting path tag {locale} 41 , indicating that the user currently has a need to manually modify the page language environment.
上述当视图模型获取语言更改指令,其中,语言更改指令包括目标语言,该目标语言为当前需要将页面的语言环境修改至的语言,假设当前语言为英文,则目标语言可以例如为中文、法文、日文等,对此不作限制。In the above, when the view model obtains the language change instruction, the language change instruction includes the target language, which is the language to which the language environment of the page currently needs to be modified. Assuming that the current language is English, the target language can be, for example, Chinese, French, Japanese, etc., without limitation.
本申请实施例中,当视图模型获取语言更改指令,其中,语言更改指令包括目标语言后,视图模型还可以检测当前页面的语言环境支持的语言与目标语言是否相同,若当前页面的语言环境支持的语言与目标语言不相同,则触发执行后续更改语言的步骤,而若当前页面的语言环境支持的语言与目标语言相同,则可以提醒用户当前语言已是目标语言,能够有效节约更改语言所需的运算资源消耗。In an embodiment of the present application, when the view model obtains a language change instruction, wherein the language change instruction includes a target language, the view model can also detect whether the language supported by the language environment of the current page is the same as the target language. If the language supported by the language environment of the current page is different from the target language, the subsequent steps of changing the language are triggered. If the language supported by the language environment of the current page is the same as the target language, the user can be reminded that the current language is already the target language, which can effectively save the computing resources required to change the language.
S202:视图模型获取页面之中的标记语料。S202: The view model obtains the markup corpus in the page.
其中,该标记语料为页面之中,部分的语料或者也可以是全部的语料,语料可以理解为页面中的文本内容,标记语料可以例如为页面中需要以目标语言进行展示的文本内容。The marked corpus may be part of the corpus or the entire corpus in the page. The corpus may be understood as the text content in the page. The marked corpus may be, for example, the text content in the page that needs to be displayed in the target language.
也即是说,本申请实施例中支持对页面中部分的标记语料的语言进行更改,由此,提供了多样化的语言更改功能,使得语言更改方式更为灵活。That is to say, the embodiment of the present application supports changing the language of part of the markup corpus in the page, thereby providing a variety of language change functions, making the language change method more flexible.
上述的标记语料可以预先是由开发者通过装饰器或过滤器进行标记的,由此,提供了一种灵活地标记语料的方式,实现简便,在提供了多样化的语言更改功能,使得语言更改方式更为灵活的同时,降低了语言更改的学习门槛。The above-mentioned marked corpus can be marked in advance by the developer through decorators or filters, thereby providing a flexible way to mark the corpus, which is easy to implement and provides a variety of language change functions, making the language change method more flexible while lowering the learning threshold of language change.
作为一种示例,开发者通过装饰器标记语料的程序代码可以示意如下:As an example, the program code that developers use decorators to mark corpora can be shown as follows:
import { i18n } from'decorators/i18n';import { i18n } from'decorators/i18n';
@i18n('table')@i18n('table')
exportdefaultclass Table extends BaseInput {exportdefaultclass Table extends BaseInput {
template = `<div>{{t('total',{index: 1, total: 10})}}</div>`;template = `<div>{{t('total',{index: 1, total: 10})}}</div>`;
initData() {initData() {
return{return {
placeholder:this.t('placeholder')placeholder:this.t('placeholder')
};}}。};}}.
作为另一种示例,开发者通过过滤器标记语料的程序代码可以示意如下:As another example, the program code for developers to mark corpora through filters can be shown as follows:
import { i18n } from'decorators/i18n';import { i18n } from'decorators/i18n';
@i18n('table')@i18n('table')
exportdefaultclass Table extends BaseInput {exportdefaultclass Table extends BaseInput {
template = `<div>{{t('total',{index: 1, total: 10})}}</div>`;template = `<div>{{t('total',{index: 1, total: 10})}}</div>`;
initData() {initData() {
return{return {
placeholder:this.t('placeholder')placeholder:this.t('placeholder')
};}。};}.
作为另一种示例,开发者通过i18n库标记语料的程序代码可以示意如下:As another example, the program code for developers to mark corpus through the i18n library can be shown as follows:
import i18n from'../../locale';import i18n from'../../locale';
@i18n('table')@i18n('table')
exportdefaultclass Table extends BaseInput {exportdefaultclass Table extends BaseInput {
template = `<div>{{i18n.t('tablbe.total',{index: 1, total: 10})}}</div>`;}。template = `<div>{{i18n.t('tablbe.total',{index: 1, total: 10})}}</div>`;}.
当然,也可以采用其他可能的方法去标记页面中需要更改语言的语料,以得到标记语料。Of course, other possible methods may also be used to mark the corpus in the page whose language needs to be changed to obtain marked corpus.
上述的标记语料是由开发者通过装饰器或过滤器进行标记得到的,因此,本申请是实施例中,视图模型获取页面之中的标记语料,可以是直接去识别页面中的标记语料,从而支撑后续对标记语料的翻译,或者,也可以通过调用预配置的一些应用程序编程接口,来实现获取页面之中的标记语料。The above-mentioned marked-up corpus is obtained by the developer through marking with decorators or filters. Therefore, in the present application, in an embodiment, the view model obtains the marked-up corpus in the page, and can directly identify the marked-up corpus in the page to support the subsequent translation of the marked-up corpus, or it can also obtain the marked-up corpus in the page by calling some pre-configured application programming interfaces.
而本申请实施例中,参见图5,图5是根据本申请第三实施例的示意图,参见图5,视图模型获取页面之中的标记语料,包括:In the embodiment of the present application, referring to FIG. 5 , FIG. 5 is a schematic diagram according to the third embodiment of the present application. Referring to FIG. 5 , the view model obtains the markup corpus in the page, including:
S501:获取页面之中的页面内容。S501: Obtain the page content in the page.
S502:提取页面内容之中的多个语料。S502: extracting multiple corpora from the page content.
S503:获取多个语料的标记。S503: Obtain tags of multiple corpora.
S504:如果多个语料之中语料的标记为国际化标记,则将语料作为标记语料。S504: If the tag of a corpus among the multiple corpora is an internationalization tag, use the corpus as a tagged corpus.
上述的国际化标记例如图6所示,图6为本申请实施例的国际化标记示意图。The above-mentioned internationalization mark example is shown in FIG6 , which is a schematic diagram of the internationalization mark of an embodiment of the present application.
上述如果多个语料之中语料的标记为国际化标记,则将语料作为标记语料,此时,可以解析与国际化标记对应的分析路径table.total,该分析路径table.total被用于后续在目标语言对应的语言包内定位用于翻译标记语料的语言内容。If the tag of a corpus among the multiple corpora is an internationalization tag, the corpus is used as a marked corpus. At this time, the analysis path table.total corresponding to the internationalization tag can be parsed. The analysis path table.total is used to locate the language content for translating the marked corpus in the language package corresponding to the target language.
也即是说,本申请实施例中通过获取页面之中的页面内容,提取页面内容之中的多个语料,并获取多个语料的标记,以及如果多个语料之中语料的标记为国际化标记,则将语料作为标记语料,提供了一种快速获取页面之中的标记语料的方法,提升页面语言更改的效率,使得页面语言环境的切换更为连贯,避免切换卡顿对用户的云体验造成影响。That is to say, in the embodiment of the present application, by obtaining the page content in the page, extracting multiple corpora in the page content, and obtaining the tags of the multiple corpora, and if the tag of a corpus in the multiple corpora is an internationalization tag, the corpus is used as the marked corpus, thereby providing a method for quickly obtaining the marked corpus in the page, improving the efficiency of changing the page language, making the switching of the page language environment more coherent, and avoiding the impact of switching jams on the user's cloud experience.
S203:视图模型将目标语言对应的语言包加载至视图模型对应的模型之中。S203: The view model loads the language package corresponding to the target language into the model corresponding to the view model.
上述由视图模型获取语言更改指令,其中,语言更改指令包括目标语言,并由视图模型获取页面之中的标记语料后,还可以由视图模型将目标语言对应的语言包加载至视图模型对应的模型之中。The view model obtains the language change instruction, wherein the language change instruction includes the target language, and after the view model obtains the markup corpus in the page, the view model can also load the language package corresponding to the target language into the model corresponding to the view model.
也即是说,本申请实施例中的页面之中语言的更改方法支持根据自定义的语言包对页面内的语言进行更改,其中,与目标语言对应的语言包可以如图7所示,图7为本申请实施例中一语言包示意图,图7中所示为当目标语言为中文时,对应的语言包,参见图8,图8为本申请实施例中另一语言包示意图,图8中所示为当目标语言为英文时,对应的语言包,对此不作限制。That is to say, the method for changing the language in the page in the embodiment of the present application supports changing the language in the page according to a customized language package, wherein the language package corresponding to the target language can be as shown in Figure 7, which is a schematic diagram of a language package in the embodiment of the present application. Figure 7 shows the corresponding language package when the target language is Chinese. See Figure 8, which is another schematic diagram of a language package in the embodiment of the present application. Figure 8 shows the corresponding language package when the target language is English, and there is no limitation on this.
本申请实施例中由于是支持了根据自定义的语言包对页面内的语言进行更改,由此,使得语言的更改能够满足页面展示的个性化需求。In the embodiment of the present application, since it supports changing the language in the page according to the customized language package, the change of the language can meet the personalized needs of the page display.
S204:视图模型通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面。S204: The view model translates the marked corpus through the language package corresponding to the target language, and displays the translated page through the view corresponding to the view model.
上述在视图模型通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面,可以具体是在翻译之后即通过视图模型对应的视图展示翻译之后的页面,或者,也可以设定展示时间点,在展示时间点上,通过视图模型对应的视图展示翻译之后的页面。In the above-mentioned view model, the marked corpus is translated through the language package corresponding to the target language, and the translated page is displayed through the view corresponding to the view model. Specifically, the translated page can be displayed through the view corresponding to the view model after the translation, or a display time point can be set, and at the display time point, the translated page is displayed through the view corresponding to the view model.
而本申请实施例中,则可以在浏览器更新页面时,通过视图模型对应的视图展示翻译之后的页面,以此,有效保障浏览器的刷新与页面语言环境切换的连贯性,避免影响针对浏览器所提供服务的感官体验度,提升用户的使用体验度。In the embodiment of the present application, when the browser updates the page, the translated page can be displayed through the view corresponding to the view model, thereby effectively ensuring the consistency of the browser refresh and the page language environment switching, avoiding affecting the sensory experience of the services provided by the browser, and improving the user experience.
作为一种示例,参见图9,图9为本申请实施例中的应用场景示意图,包括预先配置的多种语言包91,例如包括自定义语言包、中文的语言包、英文的语言包,而后,识别语言更改指令包括的目标语言,并匹配出与目标语言对应的语言包,由开发者通过装饰器或过滤器或者i18n库进行标记得到标记语料,图9中还示出了采用装饰器标记的场景92、采用过滤器标记的场景93,以及采用i18n库标记的场景94,也即是说,当得到目标语言的语言包之后,可以基于前述装饰器标记的场景92、采用过滤器标记的场景93,以及采用i18n库标记的场景94下开发者所标记的语料去确定其是否为国际化标记,也即图9中框出的标签95,若如果多个语料之中语料的标记为国际化标记,则将语料作为标记语料,从而针对标记语料进行相应的翻译。As an example, refer to Figure 9, which is a schematic diagram of an application scenario in an embodiment of the present application, including a plurality of pre-configured language packages 91, such as a custom language package, a Chinese language package, and an English language package. Then, the target language included in the language change instruction is identified, and the language package corresponding to the target language is matched. The developer obtains the marked corpus by marking it through a decorator, a filter, or an i18n library. Figure 9 also shows a scene 92 marked by a decorator, a scene 93 marked by a filter, and a scene 94 marked by an i18n library. That is to say, after obtaining the language package of the target language, it can be determined whether the corpus marked by the developer in the aforementioned scene 92 marked by the decorator, the scene 93 marked by the filter, and the scene 94 marked by the i18n library is an internationalized mark, that is, the label 95 framed in Figure 9. If the mark of a corpus among multiple corpora is an internationalized mark, the corpus is used as a marked corpus, and the marked corpus is translated accordingly.
本实施例中,采用视图模型获取语言更改指令,其中,语言更改指令包括目标语言;视图模型获取页面之中的标记语料;视图模型将目标语言对应的语言包加载至视图模型对应的模型之中;以及视图模型通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面,使得智能云管理控制台的页面语言的更改更为灵活,能够有效地适配多种不同的语言,使得语言的更改能够满足页面展示的个性化需求。In this embodiment, a view model is used to obtain a language change instruction, wherein the language change instruction includes a target language; the view model obtains the markup corpus in the page; the view model loads the language package corresponding to the target language into the model corresponding to the view model; and the view model translates the markup corpus through the language package corresponding to the target language, and displays the translated page through the view corresponding to the view model, so that the page language change of the intelligent cloud management console is more flexible and can effectively adapt to a variety of different languages, so that the language change can meet the personalized needs of page display.
图10是根据本申请第四实施例的示意图。FIG. 10 is a schematic diagram according to a fourth embodiment of the present application.
如图10所示,该页面之中语言的更改装置1000包括:As shown in FIG. 10 , the device 1000 for changing the language in the page includes:
第一获取模块1001,用于获取语言更改指令,其中,语言更改指令包括目标语言;A first acquisition module 1001 is used to acquire a language change instruction, wherein the language change instruction includes a target language;
第二获取模块1002,用于获取页面之中的标记语料;The second acquisition module 1002 is used to acquire the markup language in the page;
加载模块1003,用于将目标语言对应的语言包加载至视图模型对应的模型之中;A loading module 1003 is used to load the language package corresponding to the target language into the model corresponding to the view model;
翻译模块1004,用于通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面。The translation module 1004 is used to translate the marked corpus through the language package corresponding to the target language, and display the translated page through the view corresponding to the view model.
在本申请的一个实施例中,第一获取模块1001,具体用于:In one embodiment of the present application, the first acquisition module 1001 is specifically configured to:
当页面的语言设置状态变化时,视图模型根据变化后的语言设置状态获取语言更改指令;或者When the language setting state of the page changes, the view model obtains the language change instruction according to the changed language setting state; or
视图模型接收用户输入的语言更改指令。The view model receives language change instructions from the user.
在本申请的一个实施例中,参见图11,图11是根据本申请第五实施例的示意图,第二获取模块1002,包括:In one embodiment of the present application, referring to FIG. 11 , FIG. 11 is a schematic diagram according to the fifth embodiment of the present application, the second acquisition module 1002 includes:
第一获取子模块10021,用于获取页面之中的页面内容;The first acquisition submodule 10021 is used to acquire the page content in the page;
提取子模块10022,用于提取页面内容之中的多个语料;Extraction submodule 10022, used to extract multiple corpora from the page content;
第二获取子模块10023,用于获取多个语料的标记;以及如果多个语料之中语料的标记为国际化标记,则将语料作为标记语料。The second acquisition submodule 10023 is used to acquire tags of multiple corpora; and if the tag of a corpus among the multiple corpora is an internationalization tag, use the corpus as a marked corpus.
在本申请的一个实施例中,标记由开发者通过装饰器或过滤器进行标记。In one embodiment of the present application, marking is performed by a developer through a decorator or a filter.
在本申请的一个实施例中,翻译模块1004,还用于:In one embodiment of the present application, the translation module 1004 is further used to:
在浏览器更新页面时,通过视图模型对应的视图展示翻译之后的页面。When the browser updates the page, the translated page is displayed through the view corresponding to the view model.
需要说明的是,前述对页面之中语言的更改方法的解释说明也适用于本实施例的页面之中语言的更改装置,此处不再赘述。It should be noted that the aforementioned explanation of the method for changing the language in a page is also applicable to the device for changing the language in a page of this embodiment, and will not be repeated here.
本实施例中,获取语言更改指令,其中,语言更改指令包括目标语言,获取页面之中的标记语料,将目标语言对应的语言包加载至视图模型对应的模型之中,以及通过目标语言对应的语言包对标记语料进行翻译,并通过视图模型对应的视图展示翻译之后的页面,使得智能云管理控制台的页面语言的更改更为灵活,能够有效地适配多种不同的语言,使得语言的更改能够满足页面展示的个性化需求。In this embodiment, a language change instruction is obtained, wherein the language change instruction includes a target language, the markup corpus in the page is obtained, a language package corresponding to the target language is loaded into a model corresponding to the view model, and the markup corpus is translated by the language package corresponding to the target language, and the translated page is displayed by the view corresponding to the view model, so that the page language change of the intelligent cloud management console is more flexible, can effectively adapt to a variety of different languages, and the language change can meet the personalized needs of page display.
根据本申请的实施例,本申请还提供了一种电子设备、一种可读存储介质和一种计算机程序产品。According to an embodiment of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.
图12是用来实现本申请实施例的页面之中语言的更改方法的电子设备的框图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本申请的实现。Figure 12 is a block diagram of an electronic device for implementing a method for changing a language in a page of an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples, and are not intended to limit the implementation of the present application described herein and/or required.
如图12所示,该电子设备包括:一个或多个处理器1201、存储器1202,以及用于连接各部件的接口,包括高速接口和低速接口。各个部件利用不同的总线互相连接,并且可以被安装在公共主板上或者根据需要以其它方式安装。处理器可以对在电子设备内执行的指令进行处理,包括存储在存储器中或者存储器上以在外部输入/输出装置(诸如,耦合至接口的显示设备)上显示GUI的图形信息的指令。在其它实施方式中,若需要,可以将多个处理器和/或多条总线与多个存储器和多个存储器一起使用。同样,可以连接多个电子设备,各个设备提供部分必要的操作(例如,作为服务器阵列、一组刀片式服务器、或者多处理器系统)。图12中以一个处理器1201为例。As shown in Figure 12, the electronic device includes: one or more processors 1201, a memory 1202, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input/output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and/or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). In Figure 12, a processor 1201 is taken as an example.
存储器1202即为本申请所提供的非瞬时计算机可读存储介质。其中,存储器存储有可由至少一个处理器执行的指令,以使至少一个处理器执行本申请所提供的页面之中语言的更改方法。本申请的非瞬时计算机可读存储介质存储计算机指令,该计算机指令用于使计算机执行本申请所提供的页面之中语言的更改方法。The memory 1202 is a non-transient computer-readable storage medium provided by the present application. The memory stores instructions executable by at least one processor to enable at least one processor to execute the method for changing the language of a page provided by the present application. The non-transient computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to execute the method for changing the language of a page provided by the present application.
存储器1202作为一种非瞬时计算机可读存储介质,可用于存储非瞬时软件程序、非瞬时计算机可执行程序以及模块,如本申请实施例中的页面之中语言的更改方法对应的程序指令/模块(例如,附图10所示的第一获取模块1001、第二获取模块1002、加载模块1003以及翻译模块1004)。处理器1201通过运行存储在存储器1202中的非瞬时软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例中的页面之中语言的更改方法。The memory 1202, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the program instructions/modules corresponding to the method for changing the language in the page in the embodiment of the present application (for example, the first acquisition module 1001, the second acquisition module 1002, the loading module 1003 and the translation module 1004 shown in FIG. 10). The processor 1201 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 1202, that is, the method for changing the language in the page in the above method embodiment is implemented.
存储器1202可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据执行页面之中语言的更改方法的电子设备的使用所创建的数据等。此外,存储器1202可以包括高速随机存取存储器,还可以包括非瞬时存储器,例如至少一个磁盘存储器件、闪存器件、或其他非瞬时固态存储器件。在一些实施例中,存储器1202可选包括相对于处理器1201远程设置的存储器,这些远程存储器可以通过网络连接至该电子设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 1202 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created by the use of an electronic device according to a method for changing the language in an execution page, etc. In addition, the memory 1202 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 1202 may optionally include a memory remotely arranged relative to the processor 1201, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
该电子设备还可以包括:输入装置1203和输出装置1204。处理器1201、存储器1202、输入装置1203和输出装置1204可以通过总线或者其他方式连接,图12中以通过总线连接为例。The electronic device may further include: an input device 1203 and an output device 1204. The processor 1201, the memory 1202, the input device 1203 and the output device 1204 may be connected via a bus or other means, and FIG12 takes the connection via a bus as an example.
输入装置1203可接收输入的数字或字符信息,以及产生与该电子设备的用户设置以及功能控制有关的键信号输入,例如触摸屏、小键盘、鼠标、轨迹板、触摸板、指示杆、一个或者多个鼠标按钮、轨迹球、操纵杆等输入装置。输出装置1204可以包括显示设备、辅助照明装置(例如,LED)和触觉反馈装置(例如,振动电机)等。该显示设备可以包括但不限于,液晶显示器(LCD)、发光二极管(LED)显示器和等离子体显示器。在一些实施方式中,显示设备可以是触摸屏。The input device 1203 can receive input digital or character information, and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 1204 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、专用集成电路(ASIC)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, application specific integrated circuits (ASICs), computer hardware, firmware, software, and/or combinations thereof. These various implementations may include: being implemented in one or more computer programs that can be executed and/or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
为了提供与用户的交互,可以在计算机上实施此处描述的系统和技术,该计算机具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给计算机。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括中间件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、中间件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、互联网。The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet.
计算机系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发申请中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本申请公开的技术方案所期望的结果,本文在此不进行限制。It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
上述具体实施方式,并不构成对本申请保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本申请的精神和原则之内所作的修改、等同替换和改进等,均应包含在本申请保护范围之内。The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010614351.7A CN111966433B (en) | 2020-06-30 | 2020-06-30 | Method, device, storage medium and electronic device for changing language in page |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010614351.7A CN111966433B (en) | 2020-06-30 | 2020-06-30 | Method, device, storage medium and electronic device for changing language in page |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111966433A CN111966433A (en) | 2020-11-20 |
CN111966433B true CN111966433B (en) | 2024-11-08 |
Family
ID=73361100
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010614351.7A Active CN111966433B (en) | 2020-06-30 | 2020-06-30 | Method, device, storage medium and electronic device for changing language in page |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111966433B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113076164B (en) * | 2021-04-16 | 2024-04-16 | 北京沃东天骏信息技术有限公司 | Webpage language management method and device |
CN117273148B (en) * | 2023-09-28 | 2024-11-08 | 北京百度网讯科技有限公司 | Method, device and program product for realizing travel assistant based on large language model |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8843360B1 (en) * | 2011-03-04 | 2014-09-23 | Amazon Technologies, Inc. | Client-side localization of network pages |
CN111104108A (en) * | 2018-10-29 | 2020-05-05 | 大唐移动通信设备有限公司 | Display interface WPF generation method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011088141A2 (en) * | 2010-01-12 | 2011-07-21 | Maverick Multimedia, Inc. | Automatic technical language extension engine |
US9465608B2 (en) * | 2013-03-15 | 2016-10-11 | ArtinSoft Corporation | Code separation with semantic guarantees |
CN104346153B (en) * | 2013-07-31 | 2018-04-17 | 国际商业机器公司 | Method and system for the text message of translation application |
CN104899010B (en) * | 2014-03-04 | 2018-12-21 | 北京金山云网络技术有限公司 | The multi-lingual opinion on public affairs method and system of source code |
US20180189033A1 (en) * | 2016-12-29 | 2018-07-05 | TechRev, LLC | Graphical software meta-development tool |
CN111061533A (en) * | 2019-12-18 | 2020-04-24 | 深圳前海环融联易信息科技服务有限公司 | Page multi-language display method and device, electronic equipment and computer storage medium |
-
2020
- 2020-06-30 CN CN202010614351.7A patent/CN111966433B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8843360B1 (en) * | 2011-03-04 | 2014-09-23 | Amazon Technologies, Inc. | Client-side localization of network pages |
CN111104108A (en) * | 2018-10-29 | 2020-05-05 | 大唐移动通信设备有限公司 | Display interface WPF generation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN111966433A (en) | 2020-11-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11461111B2 (en) | Method for running applets, and electronic device | |
US11829436B2 (en) | Method and apparatus of pre-rendering page, electronic device, and storage medium | |
WO2018077085A1 (en) | Application processing method, device and storage medium | |
CN111008019B (en) | Web running method, device, equipment and medium of small program | |
US10419568B2 (en) | Manipulation of browser DOM on server | |
RU2595524C2 (en) | Device and method for processing content of web resource in browser | |
CN112416461B (en) | Video resource processing method, device, electronic equipment and computer readable medium | |
TW201911020A (en) | Page update method and device | |
CN111158799A (en) | Page rendering method and device, electronic equipment and storage medium | |
US11741002B2 (en) | Test automation systems and methods using logical identifiers | |
CN112099790A (en) | Method, device and equipment for determining page theme and storage medium | |
US20210209526A1 (en) | Landing page processing method, device and medium | |
CN111125597B (en) | Webpage loading method, browser, electronic equipment and storage medium | |
CN111897619A (en) | Browser page display method and device, electronic equipment and storage medium | |
CN111966433B (en) | Method, device, storage medium and electronic device for changing language in page | |
CN115309470A (en) | Method, device and equipment for loading widgets and storage medium | |
CN113656041A (en) | Data processing method, device, equipment and storage medium | |
CN113158098B (en) | Page generation method, device, equipment and medium | |
CN112181429A (en) | Information processing method and device and electronic equipment | |
US20200073919A1 (en) | Virtual agent creation platform | |
CN107943921B (en) | Page sharing information generation method and device, computer equipment and storage medium | |
CN110647327A (en) | Method and device for dynamic control of user interface based on card | |
CN111931524B (en) | Method, apparatus, device and storage medium for outputting information | |
CN111985760B (en) | Data content evaluation method and device, electronic equipment and storage medium | |
CN112988255B (en) | Data processing method, device and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |