{/* Do not edit this file. It is automatically generated by API Documenter. */}


## RealGridLocale

Set the locale and currency for the grid to refer to.

numberFormats: Register numberFormat using [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat){/* */} .

messages: Change the messages in the grid to suit the user environment.

**Signature:**

```typescript
export interface RealGridLocale
```

## Remarks

To display currency, `currency`{/* */} must be specified.

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [currency](/refs/Interface/RealGridLocale#currency) | string | Specify the currency code to use |
| [locale](/refs/Interface/RealGridLocale#locale) | string | Specify by language or language-region type. |
| [messages](/refs/Interface/RealGridLocale#messages) | [RealGridMessages](/refs/Interface/RealGridMessages) | Specifies the message displayed in the grid. |
| [numberFormats](/refs/Interface/RealGridLocale#numberformats) | \{ \[name: string\]: [NumberFormatOptions](/refs/Interface/NumberFormatOptions){/* */}; \} | Register the numberFormat to be used in the column. The thousand separator and decimal point symbol change depending on the locale. |

## Properties Desc

### currency

Specify the currency code to use

`Type` - string

**Remarks:**

Designated as `KRW`{/* */}, `USD`{/* */}, etc.

<hr/>

### locale

Specify it as a language or language-region type.

`Type` - string

<hr/>

### messages

Specifies the message displayed in the grid.

`Type` - [RealGridMessages](/refs/Interface/RealGridMessages)

<hr/>

### numberFormats

Register the numberFormat to be used in the column. The thousand separator and decimal point symbol change depending on the locale.

`Type` - \{ \[name: string\]: [NumberFormatOptions](/refs/Interface/NumberFormatOptions){/* */}; \}

**Remarks:**

Use [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat) to create a string to be displayed on the screen.

**Example:**


```js
RealGrid.setLocale({
  locale: "ko",
  currency: "KRW",
  numberFormats: {
    "number2": { // `number2` is set as the numberFormat of the column.
      style: "decimal", // number format
      minimumFractionDigits: 2, // Output to at least 2 decimal places. default: 0
      maximumFractionDigits: 2, // Print up to 2 decimal places. default: 3
      excelFormat: "_-#,##0.0?_ ;-#,##0.0?_ " // Format used when output to Excel
    },
    "USD": {
      style: "currency", // Currency format automatically attaches a currency symbol according to the specified currency.
      currency: "USD", // currency unit
      excelFormat: '"US$"#,##0.00' // Format used when output to Excel
    }
  }
});

const columns = [
 { name: "importPrice", fieldName: "importPrice", numberFormat: "USD"}
]
```

<hr/>