---
title: "description(withLocale:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/nsdictionary/description(withlocale:)"
---

# description(withLocale:)

Returns a string object that represents the contents of the dictionary, formatted as a property list.

## Declaration

```swift
func description(withLocale locale: Any?) -> String
```

## Parameters

- `locale`: An object that specifies options used for formatting each of the dictionary’s keys and values; pass nil if you don’t want them formatted. On iOS and macOS 10.5 and later, either an instance of NSDictionary or an NSLocale object may be used for locale. In OS X v10.4 and earlier it must be an instance of NSDictionary.

## Discussion

Discussion For a description of how locale is applied to each element in the dictionary, see description(withLocale:indent:). If each key in the dictionary responds to compare:, the entries are listed in ascending order by key, otherwise the order in which the entries are listed is undefined.

## See Also

### Describing a Dictionary

- [description](foundation/nsdictionary/description.md)
- [descriptionInStringsFileFormat](foundation/nsdictionary/descriptioninstringsfileformat.md)
- [description(withLocale:indent:)](foundation/nsdictionary/description(withlocale:indent:).md)
