Initializer

init(style:locale:)

Creates an instance using the provided format style and locale.

Declaration 宣言

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

Parameters パラメータ

style

The PersonNameComponents.FormatStyle.Style used to format the name.

locale

The 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.

The locale provides linguistic and cultural context to the formatted name. The default value is autoupdatingCurrent. 省略時の値は、autoupdatingCurrentです。

See Also 参照

Creating a Format Style