<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/PersonNameComponents/FormatStyle/init(style:locale:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation20PersonNameComponentsV11FormatStyleV5style6localeA2E0F0O_AA6LocaleVtcfc"
  },
  "title" : "init(style:locale:)"
}
-->

# init(style:locale:)

Creates an instance using the provided format style and locale.

```
init(style: PersonNameComponents.FormatStyle.Style = .medium, locale: Locale = .autoupdatingCurrent)
```

## Parameters

`style`

The [`PersonNameComponents.FormatStyle.Style`](/documentation/Foundation/PersonNameComponents/FormatStyle/Style-swift.enum) used to format the name.

`locale`

The [`Locale`](/documentation/Foundation/Locale) used to create the string representation of the name.

## Discussion

Customize the person name components format style by providing a style and a locale.

The formatted style can be long, medium, short, or abbreviated. The default value is [`PersonNameComponents.FormatStyle.Style.medium`](/documentation/Foundation/PersonNameComponents/FormatStyle/Style-swift.enum/medium).

The locale provides linguistic and cultural context to the formatted name. The default value is [`autoupdatingCurrent`](/documentation/Foundation/Locale/autoupdatingCurrent).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)