> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Locale: Display region

> Gets the region for the locale string in the supplied language.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Turns a country or locale code into the readable name of its region, written in the language you choose. For example it can turn `NL` into "Netherlands", or "Nederland" when you ask for Dutch. Use this to make raw country codes coming from another system friendly for people to read, or to translate them into your shop's language. You can pass either a plain country code such as `NL`, or a full locale such as `en-US`, in which case only the region part (`US`) is used.

This documentation describes: [Schema](/schemas/mapper/locale-display-region)

## Fields

<FormField property="language" label="Language">
  The language the region name is written in, given as a two-letter language code such as `en` for English, `nl` for Dutch, or `de` for German. Defaults to `en` (English) when left empty.
</FormField>

## Sample data

| Field    | Value |
| -------- | ----- |
| Language | `nl`  |

Input:

```json theme={null}
{ "country": "NL" }
```

Output:

```json theme={null}
{ "country": "Nederland" }
```

```json Configuration theme={null}
{
  "prototype": "locale-display-region",
  "parameters": {
    "language": "nl"
  }
}
```
