---
title: "CFBundleCopyLocalizationsForPreferences(_:_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfbundlecopylocalizationsforpreferences(_:_:)"
---

# 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

```swift
func CFBundleCopyLocalizationsForPreferences(_ locArray: CFArray!, _ prefArray: CFArray!) -> CFArray!
```

## 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

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

## Discussion

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(_:)](corefoundation/cfbundlecopybundlelocalizations(_:).md)
- [CFBundleCopyLocalizedString(_:_:_:_:)](corefoundation/cfbundlecopylocalizedstring(_:_:_:_:).md)
- [CFBundleCopyLocalizationsForURL(_:)](corefoundation/cfbundlecopylocalizationsforurl(_:).md)
- [CFBundleCopyPreferredLocalizationsFromArray(_:)](corefoundation/cfbundlecopypreferredlocalizationsfromarray(_:).md)
