---
title: variant
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/locale/variant-swift.property
---

# variant

An optional variant used by the locale.

## Declaration

```swift
var variant: Locale.Variant? { get }
```

## Discussion

Discussion This property corresponds to the va key of the Unicode BCP 47 extension. For locale instances created with the va specifier (such as en-US@va=posix), or with a custom Locale.Components, this property represents the custom variant. Otherwise, it represents the locale’s default variant.

## See Also

### Getting region components

- [region](foundation/locale/region-swift.property.md)
- [Locale.Region](foundation/locale/region-swift.struct.md)
- [subdivision](foundation/locale/subdivision-swift.property.md)
- [Locale.Subdivision](foundation/locale/subdivision-swift.struct.md)
- [Locale.Variant](foundation/locale/variant-swift.struct.md)
