martinandert / counterpart

A translation and localization library for Node.js and the browser.
MIT License
242 stars 25 forks source link

Added event on translation not found #22

Closed frg closed 9 years ago

frg commented 9 years ago

Added an event that fires when the translation was not found and a fallback has been provided. The implementation has been attached to the fact that adding a "fallback" string make the translation important. Thus if it has not been found it will emit an event.

Usage: counterpart.onTranslationNotFound(function(locale, key, fallback) {});

martinandert commented 9 years ago

Thanks! I just merged it and released a new patch version.

frg commented 9 years ago

Thanks!