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.