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

# Locales

> Supported languages for PayNext checkout form. Automatic translation with optional manual override.

<Tip>
  **PayNext automatically translates the checkout form into the following languages. You don't need to customize it, as we have adapted our checkout. However, if you'd like, you can override it manually.**
</Tip>

## Supported Locales

The PayNext SDK supports multiple locales for internationalization with automatic translations:

<Accordion title="Complete Locale Codes Reference">
  | Code    | Language         | Country/Region | ISO 639-1 |
  | ------- | ---------------- | -------------- | --------- |
  | `ar`    | Arabic           | -              | ar        |
  | `bg`    | Bulgarian        | Bulgaria       | bg        |
  | `cs`    | Czech            | Czech Republic | cs        |
  | `da`    | Danish           | Denmark        | da        |
  | `de`    | German           | Germany        | de        |
  | `el`    | Greek            | Greece         | el        |
  | `en`    | English          | -              | en        |
  | `es`    | Spanish          | Spain          | es        |
  | `et`    | Estonian         | Estonia        | et        |
  | `fi`    | Finnish          | Finland        | fi        |
  | `fil`   | Filipino         | Philippines    | fil       |
  | `fr`    | French           | France         | fr        |
  | `hr`    | Croatian         | Croatia        | hr        |
  | `hu`    | Hungarian        | Hungary        | hu        |
  | `id`    | Indonesian       | Indonesia      | id        |
  | `is`    | Icelandic        | Iceland        | is        |
  | `it`    | Italian          | Italy          | it        |
  | `ja`    | Japanese         | Japan          | ja        |
  | `ko`    | Korean           | South Korea    | ko        |
  | `lt`    | Lithuanian       | Lithuania      | lt        |
  | `lv`    | Latvian          | Latvia         | lv        |
  | `ms`    | Malay            | Malaysia       | ms        |
  | `mt`    | Maltese          | Malta          | mt        |
  | `nb`    | Norwegian Bokmål | Norway         | nb        |
  | `nl`    | Dutch            | Netherlands    | nl        |
  | `nl-BE` | Dutch (Belgium)  | Belgium        | nl        |
  | `pl`    | Polish           | Poland         | pl        |
  | `pt`    | Portuguese       | Portugal       | pt        |
  | `ro`    | Romanian         | Romania        | ro        |
  | `ru`    | Russian          | Russia         | ru        |
  | `sk`    | Slovak           | Slovakia       | sk        |
  | `sl`    | Slovenian        | Slovenia       | sl        |
  | `sr`    | Serbian          | Serbia         | sr        |
  | `sv`    | Swedish          | Sweden         | sv        |
  | `th`    | Thai             | Thailand       | th        |
  | `tr`    | Turkish          | Turkey         | tr        |
  | `ua`    | Ukrainian        | Ukraine        | uk        |
  | `vi`    | Vietnamese       | Vietnam        | vi        |
  | `zh`    | Chinese          | China          | zh        |
</Accordion>

<Note>
  All locale codes follow ISO 639-1 standards. Ukrainian uses `ua` as the locale code while maintaining ISO 639-1 compliance with `uk` for the language identifier.
</Note>

***

## Locale Detection

### Automatic Detection

The PayNext SDK automatically detects the user's locale from browser settings:

<Note>
  Configure the `locale` property (and any overrides) on the object you pass into `checkout.mount('element-id', { ...config })` after instantiating `PayNextCheckout()`, following the pattern in [Mount the Checkout](/sdk-reference/introduction/getting-started#mount-the-checkout).
</Note>

```typescript auto-detection component theme={"system"}
import { type PayNextConfig } from '@paynext/sdk'

// Automatically detects user's browser locale
const autoLocaleConfig: PayNextConfig = {
  /* other options */
  // locale not specified - uses browser default
}

// When mounting (see Getting Started "Mount the Checkout" section):
// const checkout = new PayNextCheckout()
// await checkout.mount('checkout-container', autoLocaleConfig)
```

<Note>
  Refer to [Mount the Checkout](/sdk-reference/introduction/getting-started#mount-the-checkout) for the complete mounting flow.
</Note>

### Optional Manual Override

If you need to override automatic detection, you can specify a locale:

```typescript manual-locale component theme={"system"}
import { type PayNextConfig } from '@paynext/sdk'

// Force specific locale
const germanLocaleConfig: PayNextConfig = {
  /* other options */
  locale: 'de', // Always use German
}

// When mounting (see Getting Started "Mount the Checkout" section):
// const checkout = new PayNextCheckout()
// await checkout.mount('checkout-container', germanLocaleConfig)
```

<Note>
  Refer to [Mount the Checkout](/sdk-reference/introduction/getting-started#mount-the-checkout) for the complete mounting flow.
</Note>

## Right-to-Left (RTL) Support

The PayNext SDK automatically handles RTL layout for the Arabic locale:

```typescript rtl-support component theme={"system"}
import { type PayNextConfig } from '@paynext/sdk'

// Automatically applies RTL layout and styling
const rtlConfig: PayNextConfig = {
  /* other options */
  locale: 'ar',
}

// When mounting (see Getting Started "Mount the Checkout" section):
// const checkout = new PayNextCheckout()
// await checkout.mount('checkout-container', rtlConfig)
```

<Note>
  Refer to [Mount the Checkout](/sdk-reference/introduction/getting-started#mount-the-checkout) for the complete mounting flow.
</Note>

<Tip>
  RTL layout is automatically applied for the Arabic locale. No additional configuration is needed.
</Tip>

## Locale Fallback

When a locale is not supported or fails to load:

```typescript locale-fallback component theme={"system"}
import { type PayNextConfig } from '@paynext/sdk'

const fallbackConfig: PayNextConfig = {
  /* other options */
  locale: 'unsupported-locale', // Falls back to 'en'
}

// When mounting (see Getting Started "Mount the Checkout" section):
// const checkout = new PayNextCheckout()
// await checkout.mount('checkout-container', fallbackConfig)
```

<Note>
  Refer to [Mount the Checkout](/sdk-reference/introduction/getting-started#mount-the-checkout) for the complete mounting flow.
</Note>

<Info>
  The PayNext SDK automatically falls back to English (`en`) if the specified locale is not supported or fails to load.
</Info>
