# Locale (REACT)

## Setup

The `LocaleProvider` component sets the locale for your app, formatting dates, numbers, and other locale-specific data.

> **Note:** If no `LocaleProvider` is setup, the default locale for the app will be `en-US` and therefore the direction
> will be `ltr`.

<ExampleCode id="setup" component="locale" />

## Usage

To access the current locale and direction settings, use the `useLocaleContext` hook.

<ExampleCode id="usage" component="locale" />

## API Reference

**Component API Reference**

#### React

**LocaleProvider Props:**

| Prop | Type | Required | Description |
|------|------|----------|-------------|
| `locale` | `string` | Yes | The locale to use for the application. |


#### Solid

**LocaleProvider Props:**

| Prop | Type | Required | Description |
|------|------|----------|-------------|
| `locale` | `string` | Yes | The locale to use for the application. |


#### Vue

**LocaleProvider Props:**

| Prop | Type | Required | Description |
|------|------|----------|-------------|
| `locale` | `string` | Yes | The locale to use for the application. |


#### Svelte

**LocaleProvider Props:**

| Prop | Type | Required | Description |
|------|------|----------|-------------|
| `locale` | `string` | Yes | The locale to use for the application. |