IOS localization and creation process

Source: Internet
Author: User

Before using the localization language, let's take a look at the structure of the content of the localization language file (here I use Chinese as an example ):
"Cancel" = "cancel ";
"OK" = "OK ";
"Tip" = "message prompt ";
"Login faild" = "Logon Failed ";

.......

It is actually a simple replacement of strings.ProgramIf there is a uilable control, the value must be assigned: 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 local file and setting the local language, select the created local file and add the local content to the file, as shown in figureArticleThe local language structure listed at the beginning is the same.

"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.

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.