Lock Version 9

This document uses an outdated version of Lock (version 9). Learn how to migrate to version 10, or, if you're new to Lock, start out with the Lock 10 Documentation.

Lock: Internationalization

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.