Android Enables automatic font switching in multiple languages

Source: Internet
Author: User

Android Enables automatic font switching in multiple languages

After an android project is created, the default res Directory includes layout, values, drawable, and so on.

These are the default resource file directories of the program. To implement the multi-language version, we need to add the corresponding resource files for the implementation language.

First, click the Add Android Xml File button, select the Values single region, and enter the File name: string. xml, as shown in the following figure:


Add the Region in the left list to the list on the left, and enter cn in the Region input box, as shown in figure


We also add the Language to the list on the right and enter zh, as shown in figure


Click the Finish button and the resource file will be created. Directory: res \ values-zh-rCN (in fact, the above operations are to generate this directory)


The same is true for other languages:




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.