Blog Category: IOS
Ios
First step: Create a new file in supporting files Localizable.strings. Method: Right-click on supporting files to select the new file Select Resource----strings file.
Step two: There are now infoplist.strings and localizable.strings two files. The first of these two files is used to change the item's name on the phone's total picture, and the latter one is used to change the contents. Now click on the project name---"Project---" Info enter here there is a localizations by default there is a Chinese click on the "+" below, choose your language to international is generally Chinese. Note that you will be asked to select several files, You just have to choose Infoplist.strings and localizable.strings. All other options are deselected.
Step three: Then come back and look at the two files in the project. Click Find contains two sub-files respectively. Add one later (English) (Chinese). You just have to write the content inside.
The fourth step: illustrate: Write cfbundledisplayname= "China" in Infoplist.strings (English); Write cfbundledisplayname= "China" in Info.Plist.strings (Chinese); If your mobile language environment is Chinese, your project name will be displayed, China. If your phone locale is in English, your project will show China.
Fifth step: Write "name" = "Name" in Localizable.strings (中文版); Write "name" in Localizable.strings (Chinese) =
"Name"; at this time, in the process of using such as: UILabel *label=[[uilabel alloc]initwithframe:cgrectmake (0, 0, 320, 100)];
Label.text=nslocalizedstring (@ "name", nil);
[Self.view Addsubview:label];
If the phone locale is Chinese, the text on the label is the name two characters, and if the phone locale is English, the display is name.
iOS internationalization (project name and content)