Skip to content

v2.2.0

Compare
Choose a tag to compare
@cheton cheton released this 25 Nov 12:22
· 135 commits to master since this release
5cbc63b
  • Add a trans option for specifying extensions and fallbackKey:
{
    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;
    }