Function

CFBundleCopyLocalizationsForURL

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

Declaration

CFArrayRef CFBundleCopyLocalizationsForURL(CFURLRef url);

Parameters

url

The location of a bundle’s localizations.

Return Value

An array containing the localizations available at url. Ownership follows the The Create Rule.

Discussion

For a directory URL, this is equivalent to calling the CFBundleCopyBundleLocalizations function on the corresponding bundle. For a plain file URL representing an unbundled application, this will attempt to determine its localizations using the kCFBundleLocalizationsKey and kCFBundleDevelopmentRegionKey keys in the dictionary returned by CFBundleCopyInfoDictionaryForURL, or a vers resource if those are not present.

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.

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.

CFCopyLocalizedStringFromTableInBundle

Returns a localized version of the specified string.

CFCopyLocalizedStringWithDefaultValue

Returns a localized version of a localization string.