Android language switching implementation (that's simple)

Source: Internet
Author: User

Android language switching implementation (that's simple)

Recently, as required by the project, click "system settings"> "language and Input Method"> "Select language" to switch the language in the application. If you are not talking about it, You can directly access the topic.

Take me as an example: My requirement is to switch between Simplified Chinese and Traditional Chinese.

1. you need to create two folders, values-zh-rCN, and values-zh-rTW (zh-rCN, zh-rTW, which respectively represent Simplified Chinese and Traditional Chinese, under the res directory of the project, similar to other languages)

Create a String. xml file in the two directories respectively.

For example, values-zh-rCN:

 

Values-zh-rTW

Click system Settings> language and input method> Select language> In-app language to switch. Isn't it easy!

 

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.