NopCommerce customization series (1)-localization and nopcommerce Customization

Source: Internet
Author: User
Tags nopcommerce

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.