Function

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.

Declaration

CFArrayRef CFBundleCopyLocalizationsForPreferences(CFArrayRef locArray, CFArrayRef prefArray);

Parameters

locArray

An array of possible localizations to search.

prefArray

An array of preferred localizations. If NULL, the user’s actual preferred localizations will be used.

Return Value

An array containing the localizations that CFBundle would use. Ownership follows the The Create Rule.

Discussion

This is not the same as CFBundleCopyPreferredLocalizationsFromArray, because that function takes the current application context into account. To determine the localizations that another application would use, apply this function to the result of CFBundleCopyBundleLocalizations.

See Also

Managing Localizations

CFBundleCopyBundleLocalizations

Returns an array containing a bundle’s localizations.

CFBundleCopyLocalizedString

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

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.

CFCopyLocalizedStringFromTableInBundle

Returns a localized version of the specified string.

CFCopyLocalizedStringWithDefaultValue

Returns a localized version of a localization string.