# Languages and dictionaries

#### Default language

The default language is `'auto'`, which detects the input language automatically. Auto-detection covers around 80 languages and requires at least three correctly spelled words.

To set a specific language for all users, use a locale code from the [supported languages](https://docs.wproofreader.com/features/supported-languages) list:

```js
lang: 'de_DE',
```

Users can change the language from the Settings dialog, but after a page reload, the admin-defined default is restored (unless options storage is enabled for `lang`).

#### Language auto-detection priorities

When `lang` is set to `'auto'`, the detected language maps to a default dialect. To override which dialect is used for a detected language:

```js
autoLangPriorities: {
  en: 'en_GB',
  fr: 'fr_CA'
},
```

In this example, when auto-detection identifies English, it uses British English instead of the default American English.

#### UI localization

The WProofreader interface defaults to English (`localization: 'en'`). To change it:

```js
localization: 'de',
```

To auto-detect the localization language from browser settings:

```js
detectLocalizationLanguage: true,
```

If auto-detection fails, the value in `localization` (or the default) is used as a fallback.

#### User dictionary

To assign a shared user dictionary for all users:

```js
userDictionaryName: 'shared_dictionary',
```

All words added by users via the **Add word** command go to this dictionary. If your app has authentication, you can assign different dictionaries per user.

To prevent users from creating, renaming, or deleting dictionaries while still allowing them to add and remove words, combine it with:

```js
disableDictionariesPreferences: true,
```

#### Organization dictionary

To connect organization dictionaries by their IDs (comma-separated):

```js
customDictionaryIds: '100694, 100695',
```

For the Cloud version, dictionary IDs are assigned automatically when you create a dictionary on the [Custom dictionary](https://app.wproofreader.com/custom-dictionary) page in the admin panel. For self-hosted, you assign dictionary IDs manually. For details, refer to the [Organization dictionary](/v6.12.0/features/custom-dictionary/organization-dictionary.md) overview.


---

# 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.wproofreader.com/v6.12.0/integrations/initialization/configuration-options/languages-and-dictionaries.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.
