---
title: regionCode
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nslocale/regioncode
---

# regionCode

Returns the region code of the locale. If the rg subtag is present, the value of the subtag will be used. For example,  returns “GB” for “en_US@rg=gbzzzz” locale. If the localeIdentifier doesn’t contain a region, returns nil.

## Declaration

```swift
var regionCode: String? { get }
```
