Lock: Internationalization

This document covers an outdated version of Lock - version 9. We recommend using the latest version of the library. To do so select v10 at the dropdown. If you are already using v9 but interested in upgrading, take a look at the Lock 9 to Lock 10 migration guide.

You can call instantiate the widget with the dict option:

var lock = new Auth0Lock('dsa7d77dsa7d7', 'mine.auth0.com');

lock.show({
  dict: 'es'
});

Where dict can be a string matching the name of the file in the i18n folder or it could be an object literal as follows:

var lock = new Auth0Lock('dsa7d77dsa7d7', 'mine.auth0.com');

lock.show({
  dict: {
    "loadingTitle": "loading...",
    "close": "close",
    "signin": {
    .. //same as in i18n json files
  }
});

Finally you can also make changes to an existing dictionary by merging a new dictionary in an existing one (this sample uses underscore.js):

lock.show({
  dict: _.merge(lock.$dicts.en, {
    "signup:headerText": "Hi there, please enter your email and password"
  })
})

i18n-image

For an example of available property names, see the English dictionary file for Lock 9.