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)