Skip to content

Dealing with missing translations

js-coder edited this page Dec 25, 2012 · 1 revision

Dealing with missing translations

When x18n is asked to retrieve a missing translation it will try to find the translation in similiar locale dictionaries and report the missing translation:

  1. The x18n.missingTranslations object contains the missing translations.
  2. The missing-translation event will be triggered whenever a missing translation is requested. You can handle it like this:
x18n.on('missing-translation', function (locale, key) {
  console.log(locale + " doesn't have a translation for " + key);
});
Clone this wiki locally