# Update client language

`POST /api/v1/client-config/update-language`

Set a cookie so that the next time the client refreshes the HTML of the web interface, PeerTube uses the selected language.

Deprecated.

Authentication: no security requirement declared for this operation.

Request body: application/json (required)

Type: object

- `language` (required)
  Type: string; nullable
  
  Language code to set
  
  Example:
  
  ```json
  "en-US"
  ```

Responses:

- 204: successful operation

## Examples

### cURL

```bash
curl -X POST 'https://peertube2.cpy.re/api/v1/client-config/update-language' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "language": "en-US"
}'
```

### JavaScript

```javascript
const body = `{
  "language": "en-US"
}`;

const response = await fetch('https://peertube2.cpy.re/api/v1/client-config/update-language', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body,
});

const data = await response.text();
```

### Python

```python
import requests

body = '''{
  "language": "en-US"
}'''

response = requests.post(
    'https://peertube2.cpy.re/api/v1/client-config/update-language',
    data=body.encode('utf-8'),
    headers={
        'Content-Type': 'application/json',
    },
)
print(response.text)
```
