---
title: "locale(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/personnamecomponents/formatstyle/locale(_:)"
---

# locale(_:)

Modifies the person name components format style to use the specified locale.

## Declaration

```swift
func locale(_ locale: Locale) -> PersonNameComponents.FormatStyle
```

## Parameters

- `locale`: The locale to use when formatting person name components.

## Return Value

Return Value A person name components format style with the provided locale.

## See Also

### Modifying a Format Style

- [style](foundation/personnamecomponents/formatstyle/style-swift.property.md)
- [PersonNameComponents.FormatStyle.Style](foundation/personnamecomponents/formatstyle/style-swift.enum.md)
- [locale](foundation/personnamecomponents/formatstyle/locale.md)
- [attributed](foundation/personnamecomponents/formatstyle/attributed.md)
