The order and number of name parts are not fixed
Aliases: person name order · multipart names · localized name formatting
What it is
Locale-aware person-name formatting combines name parts according to the name's own language or region, the display locale, and the usage context. given + surname is not a universal two-part structure. A person may have one name element, compound given names, multiple surnames, or other components, while order, separators, and omission can change between referring, addressing, sorting, and long or short forms.
Why it happens
Unicode LDML Person Names separates name data from display patterns. An explicit API request for order=sorting selects sorting first; otherwise the algorithm uses the PersonName's preferredOrder, then falls back through nameOrderLocales and nameLocale to derive givenFirst or surnameFirst. It then varies output by length, usage, and formality and cleans adjacent literals when a field is absent. The formatting locale selects the initial pattern set, while the name locale and script can switch or refine it, so display locale is not the sole rule source.
Where it stops holding
A sort name, index key, legal full name, chosen display name, and address form are distinct outputs, not strings that can be derived by swapping two tokens. Script can help select a formatting rule but cannot reliably reveal nationality, language, or personal preference. A transliteration is not a lossless replacement for a name in its original script. If only a full string was collected, display it faithfully rather than guessing parts; if only components exist, retain a user-confirmed full form for cases outside the pattern model.
Applying it
- Model at least a user-confirmed full display name plus optional structured parts. Where contextual formatting is genuinely needed, also retain
nameLocale, preferred order, and original-script or transliterated variants. - Use CLDR/ICU Person Names or equivalent locale patterns for referring, sorting, short, and addressing forms. Do not hard-code
{given} {surname}or reverse strings mechanically. - Test absent surname, absent given name, compound parts, scripts without spaces, multiple surnames, and mixed-script names. Check that missing fields leave no comma, period, or doubled space behind.
- Let people preview and correct the rendered name. For directories, credentials, and certificates, show the complete result before submission so an inference cannot override the person's choice.
Related
- Same group: S2.05.2 Split name fields can exclude users · S2.05.3 Middle names, patronymics, and suffixes need distinct handling · S2.05.4 Titles and honorifics vary by locale · S2.05.5 Character-set restrictions reject valid names
- Adjacent: S2.08 Sorting and indexing rules · S1.03 Character sets, font coverage, and missing glyphs
- Search terms:
person name formatting·name order·nameLocale