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

# clearLanguage()

> Remove the language set with setLanguage() so Encore copy follows the browser language again

Removes the language you set with [`setLanguage()`](./set-language), so Encore serves copy in the browser's language again. Every other attribute and the current user stay as they are.

<Note>
  New in the web SDK release that includes language support.
</Note>

## Signature

```typescript theme={null}
function clearLanguage(): void
```

## Parameters

This method takes no parameters.

## Behavior

* When a language was set, the SDK removes it and drops its cached copy and offers and fetches its configuration again right away. The web SDK does not load offers ahead of time, so they load in the new language on the next [`show()`](./show).
* When no language was set, or before [`configure()`](./configure), the call does nothing.
* It is the only call that removes the language. [`reset()`](./reset) and logout leave it in place.
* It also removes a language set through the deprecated `language` attribute.
* The browser always sends its own `Accept-Language`. This call only removes the override that outranks it.

## Usage

Call it when the user picks "System default" in your app's own language picker:

```javascript theme={null}
import Encore from '@encorekit/web-sdk';

Encore.configure({ apiKey: 'pk_live_your_key' });

function onLanguageChanged(code) {
  if (code) {
    Encore.setLanguage(code);
  } else {
    Encore.clearLanguage();
  }
}
```

## Related

* [setLanguage()](./set-language): set a language override
* [Localization](/publishers/concepts/localization): how Encore picks the language it serves


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.