How to create an iOS file? How to Use the localization language (Chinese?

Source: Internet
Author: User

In iOS files, the default application language is English. Some friends want to change the language to Chinese. How can this problem be solved? On the Internet, I saw some friends asking how to create iOS? Below are some answers to these questions! Hope to help you.

Before using the localization language, let's take a look at the structure of the content of the localization language file (Here we use Chinese as an example ):

"Cancel" = "Cancel ";

"OK" = "OK ";

"Tip" = "message prompt ";

"Login Faild" = "Logon Failed ";

It is actually a simple string replacement. in the program, if there is a UILable control, you need to assign a value: lbLoginTip. text = NSLocalizedString (@ "Login Faild", nil); On lbLoginTip, You can see "Logon Failed" instead of "Login Faild ".

Next, let's take a look at how to create a local File: First, New File, and then follow the steps.

2. Create a local file and name it:

3. After the local file is created, add the local language.

4. Only English is available here. Click Localize. here we can see that there is a local English language in Localization. What should I do if I want Chinese? But don't worry, you can add the local language you want later. It will be introduced later.

5. After creating the localization file, add the desired local language to the program and click the project file, as shown in:

6. Select a local language. You can also click "-" to remove the desired local language. Finally, click Finish to complete the creation process.

7. After creating a localization file and setting the local language, select the created localization file and add the localized content to the file, as shown in the localized language structure listed at the beginning of the article.

"Cancel" = "Cancel ";

"OK" = "OK ";

"Tip" = "message prompt ";

"Login Faild" = "Logon Failed ";

After adding the content, you can use the local language in the program as in the beginning of the 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.