<commit_before>---
section: libraries
description: Lock 10 supports multiple languages, and allows for the addition of other custom language files, as well as for customizing the values of specific pieces of text that are displayed in the Lock widget.
---

<%= include('../_includes/_lock-version') %>

# Lock: Internationalization

You can change the language of Lock by using the `language` configuration option. This will pull the corresponding language file from the `i18n` directory in Lock. Take a look at that [i18n directory](https://github.com/auth0/lock/blob/master/src/i18n/) for a current list of provided languages.

In order to use the below examples, you'll need to first include Lock in your page:

```html
<!-- Latest minor release -->
<script src="${lock_url}"></script>
```

Then, you will need to define your `options` object, and instantiate Lock.

```js
// Select a supported language
var options = {
  language: 'es'
};

// Initiating our Auth0Lock
var lock = new Auth0Lock(
  '${account.clientId}',
  '${account.namespace}',
  options
);
```

The `language` option needs to be a string matching the name of the corresponding file in the `i18n` directory within Lock. You can look at existing language files to provide an example format to copy for any new languages you wish to add yourself, and if and when supported languages are added to Lock 10, they will be added to the `i18n` directory with new releases.

You can also customize your own specific dictionary items using the `languageDictionary`option. This is especially useful if you want to keep the language using one of the supported languages, but change the specific wording of a few items, such as re-wording the `title` or making various other labels read different messages, but leaving the remaining text on the widget intact.

```js
// Customize some languageDictionary attributes
var options = {
  languageDictionary: {
    emailInputPlaceholder: "<EMAIL>",
    title: "Log me in"
  },<commit_msg>add note on missing translation values<commit_after>---
section: libraries
description: Lock 10 supports multiple languages, and allows for the addition of other custom language files, as well as for customizing the values of specific pieces of text that are displayed in the Lock widget.
---

<%= include('../_includes/_lock-version') %>

# Lock: Internationalization

You can change the language of Lock by using the `language` configuration option. This will pull the corresponding language file from the `i18n` directory in Lock. Take a look at that [i18n directory](https://github.com/auth0/lock/blob/master/src/i18n/) for a current list of provided languages.

In order to use the below examples, you'll need to first include Lock in your page:

```html
<!-- Latest minor release -->
<script src="${lock_url}"></script>
```

Then, you will need to define your `options` object, and instantiate Lock.

```js
// Select a supported language
var options = {
  language: 'es'
};

// Initiating our Auth0Lock
var lock = new Auth0Lock(
  '${account.clientId}',
  '${account.namespace}',
  options
);
```

The `language` option needs to be a string matching the name of the corresponding file in the `i18n` directory [within Lock](https://github.com/auth0/lock/tree/master/src/i18n). You can look at existing language files to provide an example format to copy for any new languages you wish to add yourself. If and when supported languages are added to Lock, they will be added to the `i18n` directory with new releases.

> **Note:** The language files that are used to support i18n contain JavaScript objects with key-value pairs representing various translations. There are some instances where not every key has an associated translation. In these cases, a warning will be shown in the console, such as: `language does not have property <missing prop>`. If you encounter missing translation values, we encourage you to submit a pull request to add the missing values to the [language file](https://github.com/auth0/lock/tree/master/src/i18n) you are interested in.

You can also customize your own specific dictionary items using the `languageDictionary`option. This is especially useful if you want to keep the language using one of the supported languages, but change the specific wording of a few items, such as re-wording the `title` or making various other labels read different messages, but leaving the remaining text on the widget intact.

```js
// Customize some languageDictionary attributes
var options = {
  languageDictionary: {
    emailInputPlaceholder: "<EMAIL>",
    title: "Log me in"
  },
{'fraction_non_alphanumeric': 0.07936507936507936, 'fraction_numerical': 0.008697542944118286, 'mean_word_length': 4.450236966824645, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 15, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4805047', 'n_tokens_mistral': 1172, 'n_tokens_neox': 1130, 'n_words': 629}