> For the complete documentation index, see [llms.txt](https://docs.digitalsamba.com/reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalsamba.com/reference/sdk/methods/configurecaptions.md).

# configureCaptions()

Changes the captions settings according to the provided params. You are able to change the font size of the captions (**small**, **medium**, **large**) and also the spoken language of the user. There is no autodetection of the speaking language, so if user is speaking in some other language than the default English, then the spoken language needs to be set for the captions to be proper.

```javascript
//Changes the captions font size to large
sambaFrame.configureCaptions({fontSize: 'large'});

//Changes the spoken language of the local user to German
sambaFrame.configureCaptions({spokenLanguage: 'de'});

//Changes the spoken language of all room users to German
sambaFrame.configureCaptions({spokenLanguage: 'de', applySpokenLanguageToAll: true});

```

| Language name | Code to use as spokenLanguage param |
| ------------- | ----------------------------------- |
| Dutch         | nl                                  |
| English       | en                                  |
| French        | fr                                  |
| German        | de                                  |
| Italian       | it                                  |
| Portuguese    | pt                                  |
| Romanian      | ro                                  |
| Spanish       | es                                  |
| Swedish       | sv                                  |

**Sample use cases**:&#x20;

* You may want to control captions appearance and language with custom buttons or dropdowns outside the DigitalSamba room interface.

{% hint style="info" %}
The related events are [captionsFontSizeChanged](/reference/sdk/events/captionsfontsizechanged.md) and [captionsSpokenLanguageChanged](/reference/sdk/events/captionsspokenlanguagechanged.md) if you want to be informed when the captions settings have been changed.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalsamba.com/reference/sdk/methods/configurecaptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
