Class

NSPersonNameComponents

An object that manages the separate parts of a person's name, for use when you need reference semantics or other Foundation-specific behavior. あるオブジェクト、それはある個人のもつ名前の個々の部分を管理します、あなたが参照意味論や他のFoundation特有の挙動を必要とする場合に使うために。

Declaration 宣言

class NSPersonNameComponents : NSObject

Overview 概要

An NSPersonNameComponents object encapsulates the components of a person's name in an extendable, object-oriented manner. It is used to specify a person's name by providing the components comprising a full name: given name, middle name, family name, prefix, suffix, nickname, and phonetic representation. NSPersonNameComponentsオブジェクトは、ある個人の名前の構成要素を、ある拡張可能な、オブジェクト指向の流儀でカプセル化します。それは、完全な名前を構成している構成要素:名、ミドルネーム、苗字、接頭辞、接尾辞、そして表音表示を提供することによってある個人の名前を指定するために使われます。

NSPersonNameComponents objects can be used by an instance of PersonNameComponentsFormatter to create string representations suitable for display in the current locale. NSPersonNameComponentsオブジェクトは、PersonNameComponentsFormatterのインスタンスによって使われて、現在のロケールで表示するのに適した文字列表現を作成します。

Working with Names 名前を扱う

It is important to understand that names are disjoint from a person’s identity. An individual may, at any time, have zero, one, or many names. Names cannot be used as a determination of a person’s identity, because two names may correspond to the same individual, and two people may have the same name. Nor can names be used as a determination of a person’s relation to others, because an individual may have a different family name than their relatives, and two individuals may have the same family name, but not be related. 名前は、ある個人の同一性から切り離されることを理解するのは重要です。ある特定の人は、いつでも、ゼロ、1つ、または多くの名前を持ちます。名前は、個人の同一性の決定として使われることはできません、なぜなら2つの名前が同じ特定の人に対応するかもしれない、そして2人の人々が同じ名前を持つかもしれないからです。そしてまた名前はある個人の他者に対する親戚関係の決定として使われることもできません、なぜならある特定の人は彼らの同族とは異なる苗字を持つかもしれない、そして2人の特定の人が同じ苗字を持つ、しかし同族ではないかもしれないからです。

Many locales and cultures have rules about what kinds of names are allowed and how they are structured. An NSPersonNameComponents object does not impose any restrictions about which combinations of properties may have values or what those values may be. 多くのロケールと文化は、どんな種類の名前が許されるかそしてどのようにそれらが体系化されるかについての規則を持ちます。NSPersonNameComponentsオブジェクトは、プロパティのどの組み合わせが値を持つかもしれないかまたはそれらの値が何であるかについて何ら制限を課しません。

Name Components 名前構成要素

An NSPersonNameComponents object encodes the following components of a personal name, which are described in detail below. NSPersonNameComponentsオブジェクトは、以下の個人名の構成要素をエンコードします、それは詳細に下で記述されます。

Given Name

A given name is bestowed upon an individual to differentiate them from other members of a group that share a family name. In some locales, this is also known as a “first name” or “forename.” 名は、ある特定の人に関して授けられて、苗字を共有するある集団の他の成員から彼らを区別します。幾つかのロケールでは、これはまた「ファーストネーム」または「フォアネーム」として知られます。

Multiple Given Names 複数の名

Names may consist of multiple given names. For example, the Spanish name “María Rosalía Rita de Castro” consists of the given names “María,” “Rosalía,” and “Rita.” 名前は、複数の名から成り立つかもしれません。例えば、スペイン語名 “María Rosalía Rita de Castro” は名 “María”、“Rosalía”、そして“Rita” から成り立ちます。

When modeling a name containing multiple given names with an NSPersonNameComponents object, concatenate them using a locale-appropriate delimiter and set the result as the givenName property value. If one of the given names is more commonly used in informal settings, such as “Rosalía” for “Rosalía de Castro,” you can set that as the nickname property value. 複数の名を含んでいる名前をNSPersonNameComponentsオブジェクトで形作る場合、それらをロケール適切な区切り子で連結して、結果をgivenNameプロパティ値として設定してください。名の1つがより一般的に形式ばらない状況で使われるならば、例えば “Rosalía de Castro” に対する “Rosalía” など、あなたはそれをnicknameプロパティ値として設定できます。

Middle Name ミドルネーム

A middle name is a secondary given name bestowed upon an individual to differentiate them from others that have the same given name. ミドルネームは、ある特定の人に授けられる二次的な名で、彼らを同じ名を持つ他者から区別します。

Multiple Middle Names and Middle Initials 複数のミドルネームとミドルイニシャル

Names can consist of one or more middle names in addition to a given name and/or family name. A middle name may appear only in certain styles, depending on the user localization preferences. 名前は、名および/または苗字に加えて、1つ以上のミドルネームからなることがあります。ミドルネームは、ユーザのローカライゼーション環境設定に依存して、特定の形式でのみ現れるかもしれません。

A middle name may consist only of an initial, such as the American name “Salmon P. Chase.” When modeling a name containing a middle initial, set the initial and locale-appropriate punctuation as the middleName property value. Although many English-speaking locales commonly abbreviate middle names with middle initials, don’t attempt to abbreviate a provided middle name yourself. 多くの英語を話すロケールが一般にミドルネームをミドルイニシャルで省略するとはいえ、提供される名前をあなた独自に省略しようとしないでください。

Sometimes, a middle name is preferred to a given name for common use. In that case, set the middleName property value as the nickname property value instead. 時々、ミドルネームは一般に使うのに名より好まれます。その場合には、middleNameプロパティ値をニックネームプロパティ値として代わりに設定してください。

When modeling a name containing multiple middle names with an NSPersonNameComponents object, concatenate them using a locale-appropriate delimiter and set the result as the middleName property value. 複数のミドルネームからなる名前をNSPersonNameComponentsオブジェクトで形作る場合、それらをロケール適切な区切り子で連結して、結果をmiddleNameプロパティ値として設定してください。

Family Name 苗字

A family name is a name bestowed upon an individual to denote membership in a group or family. 苗字は、ある特定の人に授けられて、あるグループまたは家族の中の成員であることを示します。

Prepositional Particles 前置詞小辞

Some family names consist of a prepositional phrase to denote nobility or regional ancestry, such as the Dutch name “Joost van den Vondel,” which contains the prepositional phrase “van den.” When modeling a name containing such a family name with an NSPersonNameComponents object, include any prepositional particles as part of the familyName property value.

Composite Names 複合名

Some family names consist of matronymic, patronymic, or other ancestral names. いくつかの苗字は、母系、父系、または他の先祖の名前からなります。 For example, the Chilean name “Manuel Xavier Rodríguez Erdoíza” consists of the paternal name “Rodríguez” and the maternal name “Erdoíza.” The usage and order of composite name components vary across different locales and cultures.

When modeling a name containing multiple family names with an NSPersonNameComponents object, use the entire composite family name as the familyName property value. 複数の苗字を含む名前をNSPersonNameComponentsオブジェクトで形作る場合、全複合苗字をfamilyNameプロパティ値として使ってください。

Generational Name 世代名

It is traditional in some locales, particularly in China, for relatives born in the same generation to have a common generational name. いくつかのロケール、とりわけ中国では、同じ世代の同族生まれに対して、ある共通世代名を持つことが習わしです。 For example, the Chinese name “郑秋媛 (Zheng Qiuyuan)” consists of the family name “郑 (Zheng)” and the given name “秋媛 (Qiuyuan).” The generational name “秋 (Qiu)” might be shared between the names of siblings or cousins, for instance, “郑秋德 (Zheng Qiude).” When modeling a name consisting of a generational name with NSPersonNameComponents, you should use the combined generational and given name values as the givenName property value.

Some names incorporate generational suffixes, such as “Jr.,” “Sr.,” or a roman numeral (I, II, III, IV, etc.) to distinguish between family members that have the same name. For example, the Samoan name “Malietoa Tanumafili II” contains the generational suffix “II” to denote the second generation. When modeling a name consisting of a generational suffix with NSPersonNameComponents, use it as the nameSuffix property value. いくつかの名前は、世代接尾辞、例えば “Jr.”、“Sr.”、またはローマ数詞(I、II、III、IV、など)を組み入れて、同じ名前を持つ家族構成員間を区別します。例えば、サモア人名 “Malietoa Tanumafili II” は、世代接尾辞 “II” を含むことで、2世を示します。世代接尾辞からなる名前をNSPersonNameComponentsで形作る場合、それをnameSuffixプロパティ値として使ってください。

Mononyms 単名

Some individuals are commonly, legally, and/or historically identified by a single name. ある特定の人は、普通、法的にそして/または歴史的に単一の名前で識別されます。 For example, the Lithuanian names “Vydūnas,” “Žemaitė,” and “Maironis.” When modeling a mononymous name with NSPersonNameComponents, set the name as the familyName property value.

Prefix and Suffix 接頭辞と接尾辞

A name prefix is the portion of a name’s full form of address that precedes the name itself. A name suffix is the portion of a name’s full form of address that follows the name itself. Depending on the locale and individual, both may include any number of titles, honorifics, distinctions, or other information. 名前接頭辞は、ある名前のもつ宛名の完全形式の一部です、それは名前それ自体に先行します。名前接尾辞は、ある名前のもつ宛名の完全形式の一部です、それは名前それ自体の後に続きます。ロケールと特定の人に依存して、両方とも多数の肩書き、敬称、称号、または他の情報を含むかもしれません。

Honorifics and Distinctions 敬称と称号

Names can incorporate honorifics to convey respect when addressing an individual. Depending on the locale, honorifics may be incorporated into a name prefix or suffix, which is usually applied to a full name or family name only. For example, the American name “Mr. Sherman” contains the honorific “Mr.” as a prefix, whereas the Japanese name “夏目さん (Natsume-san)” contains the honorific “san (さん)” as a suffix. Unlike most other aspects of names, honorifics are often localized to their corresponding equivalent for another language. For example, an American person might address a Japanese person as “Mr. Natsume,” and a Japanese person might address an American person as “シャーマンさん (Sherman-san).” 名前は、敬称を取り入れることで、特定の人の宛名を書く場合に敬意を伝えることができます。ロケールに依存して、敬称は接頭辞または接尾辞へと組み入れられるかもしれません、それは通常は完全名または苗字のみに適用されます。例えば、アメリカ人名 “Mr. Sherman” は敬称 “Mr.” を接頭辞として含みます、一方で日本人名 “夏目さん (Natsume-san)” は敬称 “san (さん)” を接尾辞として含みます。名前の大部分の他の面と違い、敬称はしばしば別の言語に対してそれらの対応する同義語にローカライズされます。例えば、アメリカ人はある日本人を “Mr. Natsume” として話しかけるかもしれません、そして日本人はあるアメリカ人を “シャーマンさん (Sherman-san)” のように呼びかけるかもしれません。

A person that holds an academic degree, accreditation, decoration, or honor may convey that distinction through a name prefix or suffix, which can sometimes take the place of a conventional honorific. For example, the name “James Watt, FRS, FRSE” contains the postnominal letters “FRS” and “FRSE” to convey membership to learned societies. When modeling postnominal letters with NSPersonNameComponents, concatenate them using a locale-appropriate delimiter and set the result as the nameSuffix property value. ある学問の学位、認定、勲章、または名誉を持つ人は、名前接頭辞または接尾辞を通してその違いを伝えるかもしれません、それは時には紋切り型の敬称に取って代わることがあります。例えば、名前 “James Watt, FRS, FRSE” は、地位名詞文字 “FRS” と “FRSE” を含んで、学会の一員であることを示します。地位名詞文字をNSPersonNameComponentsで形作る場合、それらをロケール適切な区切り子で連結して、結果をnameSuffixプロパティ値として設定してください。

Users often prefer to be addressed informally when using an app, so the use of honorifics in names is not always appropriate. For this reason, honorifics and other distinctions typically appear in names only when a formatter specifies the most explicit style. When such formalities are appropriate, you should be aware of the particular conventions for addressing individuals in the target locale. ユーザはしばしば形式ばらずに話しかけられるのを、あるアプリを使う場合に好みます、それで名前における敬称の利用は常に適切というわけではありません。この理由のため、敬称と他の称号は概して書式設定子が最も明確な形式を指定する場合にのみ名前の中に現れます。そのような几帳面さが適切である場合、あなたは特定の人に対象のロケールにおいて呼びかけることについて個々の慣行を承知しているべきです。

Phonetic Representation 発音表現

It is sometimes beneficial to provide phonetic representations to aid in the pronunciation of names that are foreign or unfamiliar. For example, the Malay name “يوسف بن اسحاق” in Jawi script may be transliterated into Latin script as “Yusof bin Ishak” for English-speaking locales, where Latin script is commonly used. Depending on the locale and on the way the name is to be displayed to the user, it may be appropriate to provide an appropriate transliteration. This may be provided by the user or computed using the CFStringTransform(_:_:_:_:) function, except for names in certain nonphonetic scripts. 時に有益なのは、発音表現を提供して、外国のまたは良く知られていない名前の発音の仕方における助けとすることです。例えば、ジャウィ書体でのマレー人名 “يوسف بن اسحاق” は、ラテン書体へ “Yusof bin Ishak” として英語を話すロケール、ラテン書体が普通に使われる所のために翻字されるかもしれません。ロケールにそして名前がユーザに表示されることになる方法に依存して、適切な翻字を提供することが適切かもしれません。これは、ユーザによって提供されるかまたはCFStringTransform(_:_:_:_:)関数を使って計算されるかもしれません、特定の非発音書体での名前を除いて。

A phonetic representation may also be used to specify the pronunciation of a name in idiographic script with multiple pronunciations. For example, the character “藤” in the Japanese name “近藤 藤子 (Kondō Fujiko)” is pronounced “dō” in the family name and “fuji” in the given name, which can be clarified by providing the furigana “こんどう ふじこ” as a phonetic representation for a Japanese locale. 発音表現はまた、複数の発音を持つ署名書体での名前の発音を指定するために使われるかもしれません。例えば、文字 “藤” は日本人名 “近藤 藤子 (Kondō Fujiko)” において、苗字では “dō” そして名では “fuji” と発音されます、それはふりがな “こんどう ふじこ” を発音表現として日本語ロケールに対して提供することではっきりさせられます。

A phonetic representation may also be appropriate for names in a script appropriate for, but unfamiliar to, a given locale. For example, for the French name “Claude Debussy” the phonetic representation “clawed deb-you-see” as a pronunciation aid to an American English-speaking locale. Use of this kind of phonetic representation is discouraged for most user contexts. 音声表現はまた、与えられたロケールに適した、しかしなじみの薄い書体での名前に対して適切です。例えば、フランス人名 “Claude Debussy” に対して音声表現 “clawed deb-you-see” は発音の仕方としてアメリカ英語を話すロケールに対して助けとなります。この種の音声表現の使用は、ほとんどのユーザ文脈に対して推奨されません。

Aliases 別名

Individuals may have one or more valid names, or aliases. This may be the result of adopting a new name in conjunction with a life event, such as marriage. For example, the name “Marie Curie” could have the corresponding alias “Maria Salomea Skłodowska.” 特定の個人は、1つ以上の有効な名前、または別名を持ちます。これは、新しい名前を人生の出来事に関連して取り入れる結果であるかもしれません、例えば結婚など。例えば、名前 “Marie Curie” は、対応する別名 “Maria Salomea Skłodowska” を持つことができます。

Because each alias represents a separate name, an individual with one or more aliases would be modeled by a corresponding of number of NSPersonNameComponents objects, each representing a single alias. 別名それぞれがある独立した名前を表すことから、1つ以上の別名を持つある特定の人は、それぞれ単一の別名を表している、対応する数のNSPersonNameComponentsオブジェクトによって形作られるでしょう。

Topics 話題

Accessing Person Name Components 個人名構成要素にアクセスする

Relationships 関係

Inherits From 継承元

Conforms To 次に準拠

See Also 参照

Using Reference Types 参照型を使用する