---
title: "displayName(with:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avmediaselectionoption/displayname(with:)"
---

# displayName(with:)

Returns a string suitable for display using the specified locale.

## Declaration

```swift
func displayName(with locale: Locale) -> String
```

## Parameters

- `locale`: The locale to use in generating the display name.

## Return Value

Return Value A string containing the localized display name.

## Discussion

Discussion The string takes into account this option’s common metadata, media characteristics and locale properties in addition to the provided locale to formulate a string intended for display

## See Also

### Getting the language and locale settings

- [displayName](avfoundation/avmediaselectionoption/displayname.md)
- [locale](avfoundation/avmediaselectionoption/locale.md)
- [extendedLanguageTag](avfoundation/avmediaselectionoption/extendedlanguagetag.md)
