1 xcode: it runs on the 3.1.2 system and can display Chinese normally. However, the system running on Versions later than 4.0 always shows that English internationalization is abnormal.
In ios4 or above, if it is simplified Chinese, put the international file in the zh-Hans.lproj will show normal. It cannot be placed in Zh. lproj.
2. localized strings
1) Right-click "new file" in the "supporting files" directory of the project and select the IOS resource item on the left side of the pop-up window. The "string file" icon is displayed on the right. Create this file. The new file name must be written"Localizable. Strings" must be
2) click the file you just created and select "View"-"utilities"-"file inspect" from the menu of xcode4. Some property information is displayed on the right.
3) Find the localization option. It should be empty now. Click "+" to add the domain name to the international market. Because I only made Chinese and English, I added "English" and "Chinese ".Select zh_hans for "Chinese". This is simplified Chinese..
4) after adding, you can see that your project directory will generate the corresponding directory, the zh-Hans.lproj and EN. lproj directory is localizable. Strings File
5) in xcode4, you can see a triangle icon on the left side of the previously created localizable. Strings file. After you click it, two files, one Chinese file and one English file, will be expanded. Click Edit for each file.
6) The format of the file is "key" = "value"; the semicolons must all be in English.
7) in the programTo use an international string, call nslocalizedstring(@ "About",Nil) To display strings.. The first string is the key in the file, and the second string can be replaced by nil or some comments can be written.
3. localized application name
1) Create an empty file named infoplist. Strings
Generally, the program can automatically produce this file.
2) localize infoplist. Strings. Click infoplist. Strings
. Select View> utilities> file inspect ". Click the + plus sign under the Localization Option
Add Chinese
(Zh-Hans) type is simplified Chinese. English should be added automatically. In infoplish. Strings, there will be two more Chinese-English files.
3) in this English version. Edit different infoplist. Strings files and set the display name
Cfbundledisplayname = "name ";
4) EDIT info. plist, add a new property application has localized display name, set its type to boolean, and set its value to the selected status.
Summarize these
4. NIB file and image Localization
First, the image on xcode4 cannot be directly localized. After the NIB file is localized, the corresponding image localization process is similar.
Localized nib files. 1) Click the NIB file and select "View"-"utilities"-"file inspect". Some attribute information is displayed on the right. Or press the shortcut key command + Option + 1.
In Localization
Under the option, click the + plus sign to add Simplified Chinese (zh-Hans. English
It should be automatically added.
Localized images. Only after the NIB file is localized can the image be localized. 2) Click the image.
Select "View"-"utilities"-"file inspect", and some attributes are displayed on the right. Or press the shortcut key command + Option + 1.
In Localization
Under the option, click the + plus sign to add Simplified Chinese (zh-Hans. English
It should be automatically added.