Returns locale identifiers for which a bundle would provide localized content, given a specified list of candidates for a user's language preferences.
- iOS 2.0+
- macOS 10.2+
- UIKit for Mac 13.0+Beta
- tvOS 9.0+
- watchOS 2.0+
An array of identifiers, each corresponding to a localization that a bundle can support.
An array of BCP 47 language codes corresponding to a user's preferred languages.
If this parameter is
nil, the method uses the current user's language preferences.
An array of locale identifiers, ordered according to user preference.
If none of the user-preferred localizations are available, this method returns one of the values in
This method returns only the locale identifiers for which a bundle would provide localized content. Typically, this means one of the following:
A single localization that isn't region-specific
A region-specific localization, followed by a corresponding localization that isn't region-specific, as a fallback
This method doesn't return all localizations in order of user preference. To get this information, you can call this method repeatedly, each time removing the identifiers returned by the previous call.