Macro

CFCopyLocalizedStringFromTableInBundle

Returns a localized version of the specified string.

Declaration

#define CFCopyLocalizedStringFromTableInBundle(key, tbl, bundle, comment)

Parameters

key

The development language version of the string. This string is used as the search key to locate the localized version of the string.

tableName

The name of the strings file to search. The name should not include the strings filename extension. The case of the string must match that of the file name, even on file systems (such as HFS+) that are not case sensitive with regards to file names

bundle

The bundle to examine.

comment

A comment to provide the translators with contextual information necessary for proper translation.

Return Value

The localized version of the requested string, or key if no value corresponding to key is found. Ownership follows the The Create Rule.

Discussion

This is a macro variant of CFBundleCopyLocalizedString for use with the genstrings tool.

See Also

Managing Localizations

CFBundleCopyBundleLocalizations

Returns an array containing a bundle’s localizations.

CFBundleCopyLocalizedString

Returns a localized string from a bundle’s strings file.

CFBundleCopyLocalizationsForPreferences

Given an array of possible localizations and preferred locations, returns the one or more of them that CFBundle would use, without reference to the current application context.

CFBundleCopyLocalizationsForURL

Returns an array containing the localizations for a bundle or executable at a particular location.

CFBundleCopyPreferredLocalizationsFromArray

Given an array of possible localizations, returns the one or more of them that CFBundle would use in the current application context.

CFCopyLocalizedString

Searches the default strings file Localizable.strings for the string associated with the specified key.

CFCopyLocalizedStringFromTable

Searches the specified strings file for the string associated with the specified key.

CFCopyLocalizedStringWithDefaultValue

Returns a localized version of a localization string.