---
title: "localizedString(forStatusCode:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/httpurlresponse/localizedstring(forstatuscode:)"
---

# localizedString(forStatusCode:)

Returns a localized string corresponding to a specified HTTP status code.

## Declaration

```swift
class func localizedString(forStatusCode statusCode: Int) -> String
```

## Parameters

- `statusCode`: The HTTP status code. See http://www.ietf.org/rfc/rfc2616.txt for details.

## Return Value

Return Value A localized string suitable for displaying to users that describes the specified status code.

## See Also

### Getting response status codes

- [statusCode](foundation/httpurlresponse/statuscode.md)
