[WP8] about class library Localization

Source: Internet
Author: User

The toggleswitch control in wptoolkit is a common control. When I was doing this, I encountered a problem. The default language was changed to Chinese, and the mobile phone system language was also Chinese, however, the switch status cannot apply the localized language library, and the switch status always shows on/off, while the product requires a Chinese switch.

The wptoolkit package downloaded through nuget contains the Chinese Language

After some exploration, I finally found the reason.

In the Chinese vs development environment, the project generated is ZH-CN in the Chinese language by default, which is defined in the assemblyinfo. CS file.

We need to change the default language of the project to English en-us, so that the project can automatically reference multi-country language packs and automatically apply localization.

 

Set neutralresourceslanguageattribute in the assemblyinfo. CS file to en-us.

[Assembly: neutralresourceslanguageattribute ("En-us")]

Localization is successful, and the switch text shows Chinese. If other languages are added to the project language, vs automatically packs the related language packs together during packaging.

 

Project information page:

 

After xap unpacks, you can see that, except for the default language, there is an additional localized folder in other languages, which contains the localized language resources (if other languages are added, the corresponding Language Pack will also be referenced during packaging)

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.