airbnb / polyglot.js

Give your JavaScript the ability to speak many languages.
http://airbnb.github.io/polyglot.js
BSD 2-Clause "Simplified" License
3.71k stars 208 forks source link

[New] add `onMissingKey` constructor option #77

Closed ljharb closed 8 years ago

ljharb commented 8 years ago

This can call .transformPhrase, or return false, or undefined, or throw - whatever you like.

onMissingKey overrides allowMissing, which is now deprecated.

Fixes #34.