NopCommerce customization series (1)-localization and nopcommerce Customization
Due to limited technology, we will not discuss about the Nop framework, but only implement customization for Nop. If this series of articles does not help you, you can go to http://www.nopchina.net/to see.
This chapter mainly describes the Chinese version.
I. Add Simplified Chinese Language
Log on to the background, find the Language in Configuration, and enter.
Click Import resources to Import the resource package.
Machine Translation may cause many translation problems. If you modify the new version, View string resources in the language list will go to the resource page for operations.
Resources: http://files.cnblogs.com/files/hcit/Data.rar 3.7 Simplified Chinese resource files and database design documents.
Ii. Localization of background UI
Kendoui is used in the background, and the Directory Nop. Web/Scripts/kendo is used.
(1) SetTelerikCulture method in Libraries/Nop. Core/CommonHelper. cs.
1 /// <summary> 2 /// Set Telerik (Kendo UI) culture 3 /// </summary> 4 public static void SetTelerikCulture() 5 { 6 //little hack here 7 //always set culture to 'en-US' (Kendo UI has a bug related to editing decimal values in other cultures). Like currently it's done for admin area in Global.asax.cs 8 9 //var culture = new CultureInfo("en-US");10 var culture = new CultureInfo("zh-CN");11 Thread.CurrentThread.CurrentCulture = culture;12 Thread.CurrentThread.CurrentUICulture = culture;13 }
Change to zh-CN
(2) Presentation/Nop. Admin/Views/Shared/_ AdminLayout. cshtml
Add CSS styles
Html.AppendScriptParts(string.Format("~/Scripts/kendo/{0}/cultures/kendo.culture.zh-CN.min.js", kendoVersion));Html.AppendScriptParts(string.Format("~/Scripts/kendo/{0}/cultures/kendo.messages.zh-CN.js", kendoVersion));
Add call
<script> kendo.culture("zh-CN");</script>
After the Chinese version is completed, the editor's question will be explained in the next article.
Thank you for your support!