Localizing Property List Values: internationalize The text to be displayed in the Info.plist file (the name of the app or the text of the Quick Action (Shortitem))

Source: Internet
Author: User

Localizing Property List Values

Many of the attribute key values in Info.plist are for the readable strings displayed in the Finder or in your app. When you internationalize your app, you should make sure that the strings are internationalized.

Internationalized values are not stored in the Info.plist, Instead, it is stored in a special file called Infoplist.strings. Put this file in the corresponding internationalization file. The content in the Infoplist.strings file is the only key and corresponding translation you want to internationalize. The program looks up these in info.plist according to the user's language. A key-value pair that returns the corresponding value in the corresponding infoplist.strings file that exists. If the internationalized version does not exist, the program returns the value in the existing Info.plist file.

For example, set a different language version of the app name:



Add different names for each attribute in the corresponding file:

For example, in the Chinese file to add cfbundledisplayname = "English name";

Add cfbundledisplayname = "Chinese name" to simplified file;


Internationalization of Shortitem files



Also add corresponding translations in the corresponding internationalized infoplist.strings file

For example, add in the Chinese version:

Home = "Touch";

Curve = "Curve";

Shake = "Shake";

Music = "Music"; Add in Simplified

Home = "click";

Curve = "curve";

Shake = "Shake a Shake";

Music = "musical";


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.