> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/sdk/site-sdk/site-settings/locale/introduction.md

## Article Content:

# About the Locale API

The Locale API lets you read the site's language and regional settings. Use it to format dates, times, and numbers, and to lay out text, so they match the site's settings for every site visitor, both on the server and in the browser.

With the Locale API, you can:

- Retrieve the site's main language and its text direction.
- Retrieve the site's regional format.
- Retrieve the site's time zone.

Every value comes from the site's settings, not the site visitor's browser or device. The values are the same while the page renders on the server and in the browser, so code that formats with them produces the same output in both places.

## Before you begin

It's important to note the following points before starting to code:

- The values can change while the page is open. Read them while a component renders, so the component updates when they change.

## Use cases

- [Show dates and times in the site time zone](https://dev.wix.com/docs/sdk/site-sdk/site-settings/locale/sample-flows.md)
- [Support languages written from right to left](https://dev.wix.com/docs/sdk/site-sdk/site-settings/locale/sample-flows.md)

## Terminology

- **Regional format**: The site's setting for how to write dates, times, and numbers, such as whether the day comes before the month.
- **Site time zone**: The time zone set for the site's business. It's the same for every site visitor, wherever they're located.

## SDK setup

@package_metadata:@wix/site-service-locale

To use the API, install the `@wix/site-service-locale` package:

```bash
npm install @wix/site-service-locale
```

#### Import the package

```ts
import { LocaleDefinition } from '@wix/site-service-locale/definition'
```

#### Import types

Import any type shown in these docs from `@wix/site-service-locale/types`:

```ts
import type { <TypeName> } from '@wix/site-service-locale/types'
```

#### Resolve the service

In a React component, resolve the service with the `useService` hook:

```tsx
import { useService } from '@wix/services-manager-react'
import { LocaleDefinition } from '@wix/site-service-locale/definition'

function LocalizedText({ text }: { text: string }) {
    const localeService = useService(LocaleDefinition)

    return <p dir={localeService.direction}>{text}</p>
}
```