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.