xcode - 有人知道xcode文件 "InfoPlist.strings (English)"是什么吗?

标签 xcode macos applescript

有谁知道是什么文件InfoPlist.strings是为了?它在 Xcode 3.2 中。它是 Applescript 中的 Cocoa 应用程序。

最佳答案

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:

<key>CFBundleDisplayName</key> 
<string>TextEdit</string>
<key>NSHumanReadableCopyright</key> 
<string>Copyright © 1995-2009, Apple Inc.,All Rights Reserved.</string> 

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.";

来自 developer.Apple.com

关于xcode - 有人知道xcode文件 "InfoPlist.strings (English)"是什么吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14538484/

相关文章:

Xcode——什么是 $(SRCROOT)?

swift - 选择日期选择器单元格时禁用 tableView

xcode - OSX Storyboards - 使用标准 segue 打开非模态窗口

ios - getCString 和 withCString 在不同架构上的行为

macos - 如何在 OS X 上按顺序运行多个脚本文件?

iOS - 搜索 TableView

ios - 在 Xcode/iOS 项目之间共享文件

python - 使用 PyQtGraph,我的曲面图显示在窗口的左下角。

cocoa - 远程计算机上带有 iTunes 的 AppleScript

java - Mac 的 SetParent 函数(Java、AppleScript 或 Objective-C)