Multilingual Windows Phone 8

Source: Internet
Author: User

In WP8, it is very easy to support other languages. A lot of work vs ide has already been done for us, and only a little work needs to be done by myself:

1. Open the properties of the project (not a solution)

. 2. in the list in the lower left corner, select the language to be supported and save. in this way, the corresponding resource files will be automatically added to the resources directory of the project. note: select "Chinese (simplified, PRC)" When selecting to support Chinese. There are many Chinese options in this list.

3. Then open the vivid appresources. zh-CN.resx to translate.

So far, our support for Chinese has been completed. Easy!

The rest is inCodeThe string is used in two ways:

1). In the XAML file: text = "{Bing Path = localizedresources. applicationtitle source = {staticresource localizedstrings }}"

2). In CSSource codeMedium: appbarbutton. Text = appresources. appbarbuttontext;

Here, appbarbuttontext is defined in the appresources. Designer. CS file:

Public static string appbarbuttontext

{

Get {return ResourceManager. getstring ("appbarbuttontext", resourceculture );}

}

Now, the multi-language support is like this.

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.