The development of mobile applications is more likely to attract more users to the world, which requires the application to be internationalized. Internationalization is actually a multi-language process. This article introduces the internationalization of Xcode4.5 and later, including Internationalization of application names and application content. For versions earlier than Xcode4.5, see.
Internationalized application content
1. Create a resource file named Localizable. strings.
2. In the attribute selector on the right, you can see the multiple buttons Localize:
3. Click the Localize button. If you have not done internationalization, the options are only English. If you have done internationalization, there will be multiple options.
4. Click the Localize button, click the PROJECT root directory, select the PROJECT, and select the INFO tab. At the bottom, we can see Localizations and click "+" to select a language.
5. Check Localizable. strings,
6. First select the Localizable. strings (English) file and add the following content in the corresponding content:
"Language" = "english ";
Select the Localizable. strings (Chinese) file and add the following content:
"Language" = "Chinese ";
7. Use NSLocalizedString to obtain the content
NSLog (@ "% @", NSLocalizedString (@ "language ",@""));
The system identifies Chinese or English based on the language environment of the current device. International Application name
1. Based on the above operations, select InfoPlist. strings.
In InfoPlist. strings (English), add:
CFBundleDisplayName = "English ";
In InfoPlist. strings (Chinese), add:
CFBundleDisplayName = "Chinese ";
2. Why is CFBundleDisplayName?
You can view the key of the Application name by following these steps.
So far, the application name and the application content have been internationalized.
/**
* @ Author Zhang xingye * http://blog.csdn.net/xyz_lmn* iOS entry group: 83702688
* Android Development Group: 241395671
* My Sina Weibo:@ Zhang xingye TBOW*/
Refer:
Http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOSCh/chapters/InternationalizeYourApp/
Http://www.cnblogs.com/stoic/archive/2012/07/08/2581298.html
Http://blog.csdn.net/tangren03/article/details/8081032