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

# description(withLocale:)

Returns a string that represents the contents of the number object for a given locale.

## Declaration

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

## Parameters

- `locale`: An object containing locale information with which to format the description. Use nil if you don’t want the description formatted.

## Return Value

Return Value A string that represents the contents of the number object formatted using the locale information in locale.

## Discussion

Discussion For example, if you have an NSNumber object that has the integer value 522, sending it the description(withLocale:) message returns the string “522”. To obtain the string representation, this method invokes NSString’s   initWithFormat:locale: method, supplying the format based on the type the NSNumber object was created with:  |   |   |   |   |   |   |   |   |   |   |   |   |

## See Also

### Retrieving String Representations

- [stringValue](foundation/nsnumber/stringvalue.md)
