July 16, 2019 abp (net core) + easyui + efcore implement Warehouse Management System - Multilingual (X)

abp (net core) + easyui + efcore implement warehouse management system directory

abp (net core) + easyui + efcore implement warehouse management system --ABP general introduction (a)

abp (net core) + easyui + efcore implement Warehouse Management System - Solutions Introduction (b)

abp (net core) + easyui + efcore implement warehouse management system - the domain layer created entity (c)

 abp (net core) + easyui + efcore implement warehouse management system - Define and implement storage (IV)

abp (net core) + easyui + efcore implement Warehouse Management System - Create application services (five)

abp (net core) + easyui + efcore implemented warehouse management system - to achieve the presentation layer of the CRUD controller (vi)

abp (net core) + easyui + efcore implement Warehouse Management System - the presentation layer to achieve CRUD the list view (seven)

abp (net core) + easyui + efcore implement Warehouse Management System - the presentation layer to achieve the CRUD CRUD view (eight)

abp (net core) + easyui + efcore implement Warehouse Management System - the presentation layer to achieve CRUD and test the menu (IX)

 

  Continued ( ABP (NET Core) + easyui + efcore implement Warehouse Management System - to show the menu and the test layer implementation of CRUD (ix) ), in this article we introduce the ABP multi-language, as well as in the creation of this function is BUG and solutions encountered.

 

 

Eight, multi-language

        Localization (Localization) is a multi-language function, whereby the user can select his mother tongue or familiar language to use the system, which is obviously very beneficial to the software system to the international. A UI interface of the application has at least one language, ABP development framework provides a flexible framework for multi-language, we can simplify our development time in multi-language. ABP multi-use language simply need to complete three steps: the establishment of resources, resource allocation and use of resources.

       Localized content is primarily text string, ABP offers three ways to store localized resources the way, are the built-in ASP.NET resource files, XML files, and custom resource acquisition mode. ABP is a sub-modules, each module can be defined independently of localized sources, each localized resource must have a unique name.

      Next we introduce XML file to store localized resources, XML files must be unicode (UTF-8).

      1. In Visual Studio 2017, press F5, run our application. After the login screen to log in. The following diagram, we add the Module menu has been added to the left side of the menu bar. But this Module name of the menu is in English.

 

 

      2. When we change the language option in the top right corner of the page, follow the changes in language are other menu changes, we added new Module menu does not change.

 

      3. In Visual Studio 2017's "Solution Explorer", open the "ABP.TPLMS.Core" Localization directory project. Find TPLMS.xml and TPLMS-zh-Hans.xml two files. As shown below.

        

     4. In Visual Studio 2017's "Solution Explorer", open TPLMS.xml and TPLMS-zh-Hans.xml two files. English and Chinese were added information about the Module menu. Figures 1 and 2 as follows ..

 

 

1 English

 

 

2 Chinese

       5. 在Visual Studio 2017中按F5,运行我们的应用程序。在登录界面登录之后。当我们改变页面中右上角处的语言选项时,我们新增加的Module菜单跟随语言的变化而变化了,当语言选择为中文时,菜单名称由“Module”变为“模块管理”。如下图。

 

 

九、bug解决

     在编程的过程中肯定会存在BUG,此功能模块的制作过程中也存在BUG,现在介绍如下:

    第一个BUG

     1. 在Visual Studio 2017中按F5,运行我们的应用程序。如果出现如下图的错误信息,缺少_ValidationScriptsPartial.cshtml文件。

 

 

      2.解决方法,在Visual Studio 2017的菜单“文件->新建->项目”,在弹出对话话框“新建项目”中选择ASP.NET Core Web应用程序,并点击“确定”按钮。如下图。

 

 

      3.在弹出对话框“新建ASP.NET Core Web应用程序-WebApplication1”中选择“Web应用程序(模型视图控制器)”,然后点击“确定”按钮。如下图。

 

       4.找到我们刚才创建的项目目录,在\WebApplication1\Views\Shared目录中找到_ValidationScriptsPartial.cshtml文件,并把此文件复制到我们的“ABP.TPLMS.Web.Mvc”项目的Views\Shared目录下。

 

       第二个BUG

       5.如果在新建界面(如下图1)中点击保存时,出现错误信息,如图2。此错误时由于我们并没有把所有的必填字段填写上。如图3。跟图1相比,图1中我们缺少了一个必填字段。

图1

 

 

图2

 

 

图3

 

 

 

 

Guess you like

Origin www.cnblogs.com/chillsrc/p/11231265.html