Does anybody know what the xcode file “InfoPlist.strings (English)” is?

☆樱花仙子☆ 提交于 2019-12-09 17:58:22

问题


Does anyone know what the file InfoPlist.strings is for? It is in Xcode 3.2. It is a Cocoa app in Applescript.


回答1:


An information property list file is a structured text file that contains essential configuration information for a bundled executable. The file itself is typically encoded using the Unicode UTF-8 encoding and the contents are structured using XML. The root XML node is a dictionary, whose contents are a set of keys and values describing different aspects of the bundle. The system uses these keys and values to obtain information about your app and how it is configured. As a result, all bundled executables (plug-ins, frameworks, and apps) are expected to have an information property list file.

By convention, the name of an information property list file is Info.plist.

Localized values are not stored in the Info.plist file itself. Instead, you store the values for a particular localization in a strings file with the name InfoPlist.strings. You place this file in the same language-specific project directory that you use to store other resources for the same localization. The contents of the InfoPlist.strings file are the individual keys you want localized and the appropriately translated value. The routines that look up key values in the Info.plist file take the user’s language preferences into account and return the localized version of the key (from the appropriate InfoPlist.strings file) when one exists. If a localized version of a key does not exist, the routines return the value stored in the Info.plist file.

For example, the TextEdit app has several keys that are displayed in the Finder and thus should be localized. Suppose your information property list file defines the following keys:

CFBundleDisplayName TextEdit NSHumanReadableCopyright Copyright © 1995-2009, Apple Inc.,All Rights Reserved. The French localization for TextEdit then includes the following strings in the InfoPlist.strings file of its Contents/Resources/French.lproj directory:

CFBundleDisplayName = "TextEdit"; NSHumanReadableCopyright = "Copyright © 1995-2009 Apple Inc.\nTous droits réservés.";

From developer.Apple.com



来源:https://stackoverflow.com/questions/14538484/does-anybody-know-what-the-xcode-file-infoplist-strings-english-is

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!