# captionsSpokenLanguageChanged

When the user changes his captions spoken language from the settings inside the room, then the **captionsSpokenLanguageChanged** event will be emitted.

{% hint style="info" %}
You can also change the captions spoken language programmatically through the SDK. Use the [configureCaptions](/reference/sdk/methods/configurecaptions.md) method to achieve that.
{% endhint %}

#### Sample payload

```json
{
  "type": "captionsSpokenLanguageChanged",
  "data": {
    "language": "de"
  }
}
```

#### Sample subscription code

```javascript
sambaFrame.on('captionsSpokenLanguageChanged', (event) => {
  const data = event.data;
  //Possible values for "language" field are language codes described in the docs of configureCaptions event
  console.log('Captions spoken language has been changed to', data.language);
});
```


---

# Agent Instructions: 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/events/captionsspokenlanguagechanged.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.
