v2.2.0
- Add a
trans
option for specifyingextensions
andfallbackKey
:
{
trans: {
extensions: ['.js', '.jsx'],
fallbackKey: false // Defaults to false
}
}
Available options for fallbackKey
:
- Pass
true
to return the content as key. - Specify a function to return user-defined key:
// @param {string} ns The namespace currently used. // @param {string} value The value. // @return {string} Returns a translation key for the given value. fallbackKey: function(ns, value) { return value; }