---
title: "locale(_:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/duration/timeformatstyle/attributed-swift.struct/locale(_:)"
---

# locale(_:)

Modifies the format style to use the specified locale.

## Declaration

```swift
func locale(_ locale: Locale) -> Duration.TimeFormatStyle.Attributed
```

## Parameters

- `locale`: The locale to use when formatting a duration.

## Return Value

Return Value A format style with the provided locale.
