API reference / @localizer/format-displayname / displayNameFormatter
Function: displayNameFormatter()
displayNameFormatter<
T>(type,options?):ValueFormatter<T>
Defined in: displayNameFormatter.ts:32
Creates a localized display name formatter.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends string | The value type to format, typically a string. |
Parameters
| Parameter | Type | Description |
|---|---|---|
type | "language" | "region" | "script" | "calendar" | "dateTimeField" | "currency" | The display name type, e.g., "language", "region", "script", etc. |
options? | DisplayNameFormatOptions | Formatting options, including transformations. |
Returns
A function to format values into localized display names.