---
title: "selectMediaPresentationLanguage(_:for:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avplayeritem/selectmediapresentationlanguage(_:for:)"
---

# selectMediaPresentationLanguage(_:for:)

When the associated AVPlayer’s appliesMediaSelectionCriteriaAutomatically property is set to YES, configures the player item to prefer a particular language, replacing any previous preference for available languages of the specified group’s custom media selection scheme.

## Declaration

```swift
func selectMediaPresentationLanguage(_ language: String, for mediaSelectionGroup: AVMediaSelectionGroup)
```

## Parameters

- `mediaSelectionGroup`: The media selection group, obtained from the receiver’s asset, to which the specified setting is to be applied.

## Discussion

Discussion Overrides preferences for languages specified by the AVPlayer’s current media selection criteria. This method has no effect when the associated AVPlayer’s appliesMediaSelectionCriteriaAutomatically property has a value of NO, in which case you must use -selectMediaOption:inMediaSelectionGroup: instead in order to alter the presentation state of the media.

## See Also

### Selecting media options

- [select(_:for:)](avfoundation/avplayeritem/select(_:for:).md)
- [preferredCustomMediaSelectionSchemes](avfoundation/avplayeritem/preferredcustommediaselectionschemes.md)
- [effectiveMediaPresentationSettings(for:)](avfoundation/avplayeritem/effectivemediapresentationsettings(for:).md)
- [selectedMediaPresentationLanguage(for:)](avfoundation/avplayeritem/selectedmediapresentationlanguage(for:).md)
- [selectedMediaPresentationSettings(for:)](avfoundation/avplayeritem/selectedmediapresentationsettings(for:).md)
- [currentMediaSelection](avfoundation/avplayeritem/currentmediaselection.md)
- [select(_:in:)](avfoundation/avplayeritem/select(_:in:).md)
- [selectMediaOptionAutomatically(in:)](avfoundation/avplayeritem/selectmediaoptionautomatically(in:).md)
