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

# Languages

> Learn how to retrieve and use supported languages for FaceSign verification sessions.

FaceSign supports multiple languages for the verification interface, allowing you to provide a localized experience for users worldwide. The `/langs` endpoint returns all available languages that can be used in your verification sessions.

## Supported languages

| Language                      | Code |
| ----------------------------- | ---- |
| English (Default)             | `en` |
| French (Francais)             | `fr` |
| German (Deutsch)              | `de` |
| Russian                       | `ru` |
| Spanish (Espanol)             | `es` |
| Indonesian (Bahasa Indonesia) | `id` |
| Norwegian (Norsk)             | `no` |
| Portuguese (Portugues)        | `pt` |
| Italian (Italiano)            | `it` |

## Language object

| Property | Type     | Description                                          |
| -------- | -------- | ---------------------------------------------------- |
| `id`     | `string` | Language code (ISO 639-1 format).                    |
| `title`  | `string` | Human-readable language name in the language itself. |

***

## Get supported languages

`GET /langs`

Returns a list of all languages supported by FaceSign. Use these language codes when creating sessions to specify which languages should be available to users.

<Tabs>
  <Tab title="cURL">
    ```bash title="Request" wrap theme={null}
    curl https://api.facesign.ai/langs \
      -H "Authorization: Bearer sk_test_..."
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript title="Request" wrap theme={null}
    import Client from '@facesignai/api'
    import { FSNodeType } from '@facesignai/api'

    const client = new Client({
      auth: 'sk_test_...',
    })

    const { langs } = await client.langs.retrieve()

    // Use in session creation
    const { session, clientSecret } = await client.session.create({
      clientReferenceId: 'user_123',
      langs: ['en', 'es', 'fr'],
      defaultLang: 'en',
      flow: {
        nodes: [
          { id: 'start', type: FSNodeType.START, outcome: 'end' },
          { id: 'end', type: FSNodeType.END }
        ],
        edges: [{ id: 'e1', source: 'start', target: 'end' }]
      }
    })
    ```
  </Tab>

  <Tab title="Python">
    ```python title="Request" wrap theme={null}
    import facesignai

    client = facesignai.Client(
        auth='sk_test_...',
    )

    response = client.langs.retrieve()
    langs = response['langs']

    # Use in session creation
    session_response = client.session.create(
        client_reference_id='user_123',
        langs=['en', 'es', 'fr'],
        default_lang='en',
        flow={
            'nodes': [
                {'id': 'start', 'type': 'start', 'outcome': 'end'},
                {'id': 'end', 'type': 'end'}
            ],
            'edges': [{'id': 'e1', 'source': 'start', 'target': 'end'}]
        }
    )
    ```
  </Tab>
</Tabs>

```json title="Response" wrap theme={null}
[
    { "id": "en", "title": "English" },
    { "id": "de", "title": "German" },
    { "id": "ru", "title": "Russian" },
    { "id": "fr", "title": "French" },
    { "id": "es", "title": "Spanish" },
    { "id": "id", "title": "Indonesian" },
    { "id": "no", "title": "Norwegian" },
    { "id": "it", "title": "Italian" }
]
```

***

## Using languages in sessions

### Basic language configuration

When creating a session, you can specify which languages should be available and set a default language:

```typescript title="Configure session languages" wrap theme={null}
const { session, clientSecret } = await client.session.create({
  clientReferenceId: 'user_123',
  langs: ['en', 'es', 'fr'], // Available languages for this session
  defaultLang: 'en', // Default language if user's preference isn't available
  flow: [
    { id: 'start', type: FSNodeType.START, outcome: 'end' },
    { id: 'end', type: FSNodeType.END }
  ]
})
```

## Best practices

FaceSign provides an endpoint to fetch the list of currently supported languages. It is recommended to retrieve this list from the API and store it locally -- for example, in your database or an in-memory cache. To keep your local list up to date, listen for the `settings.langs` webhook event, which notifies your application of any changes to the supported languages. When this event is received, fetch the updated languages list from the API and update your local storage.

This approach ensures your application always has the most current set of available languages, minimizing API calls and keeping your user experience consistent even as available languages change.

## Next steps

<CardGroup cols={2}>
  <Card title="Sessions" href="/docs/reference/concepts#sessions">
    Use languages in sessions
  </Card>

  <Card title="Avatars" href="/docs/reference/avatars">
    Multi-language avatars
  </Card>

  <Card title="Customization" href="/docs/guides/customize-branding">
    Customize UI text
  </Card>
</CardGroup>
