<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFBundleCopyLocalizationsForPreferences(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFBundleCopyLocalizationsForPreferences"
  },
  "title" : "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.

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

An array containing the localizations that CFBundle would use. Ownership follows the [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029).

## Discussion

This is not the same as [`CFBundleCopyPreferredLocalizationsFromArray(_:)`](/documentation/CoreFoundation/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(_:)`](/documentation/CoreFoundation/CFBundleCopyBundleLocalizations(_:)).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)