IOS-Application Internationalization

Source: Internet
Author: User

Development of mobile applications more want to get more users, to the world, which requires the application of internationalization, internationalization is actually multi-language. This article introduces the internationalization of Xcode4.5, including application name internationalization and application content internationalization. Please refer to the previous version if it is Xcode4.5.

Application content Internationalization

1. Create a new resource file named Localizable.strings

2, in the right side of the property selector can see a button localize:3, click the Localize button, if not done internationalization processing, the option is only Chinese, has done the internationalization processing will have many options.

4, click the Localize button, click the project root directory, and select Project, and then select the Info tab, at the bottom we see the localizations, click "+" to select a language.

5, at this time to see localizable.strings,6, in the corresponding add content first select Localizable.strings (English) file, add the following content:

"Language" = "中文版";

Then select the Localizable.strings (Chinese) file and add the following:

"Language" = " Chinese";

7. Use nslocalizedstring to get content

NSLog(@ "%@",nslocalizedstring(@ "Language", @ ""));

The system will recognize the use of Chinese or English based on the locale of the current device. Application name Internationalization

1, on the basis of the above operation, select Infoplist.strings.

Infoplist.strings (中文版):

Cfbundledisplayname="中文版";

Infoplist.strings (Chinese), add:

Cfbundledisplayname="Chinese";

2, why is Cfbundledisplayname?

Use the steps to view the key for the app name.

At this point, the internationalization of the app name and app content is complete.

IOS-Application Internationalization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.