Skip to content

1.2.0

Compare
Choose a tag to compare
@jarda-svoboda jarda-svoboda released this 16 Apr 13:15
· 71 commits to master since this release

What's Changed

  • config.debug has been replaced by config.log object:
const config = {
  // ...your config...
  log: {
    logger: console, // you can use custom loggers => { error: errorHandler, warn: warnHandler, debug: debugHandler }
    level: 'warn', // 'error' | 'warn' | 'debug'
    prefix: '[i18n]: ', // avoid by '' (empty string)
  }
}
  • Added config.fallbackValue. By default translation key is returned when no translations have been found for given translation key. You can override it using this parameter like so:
const config = {
  // ...your config...
  fallbackValue: undefined, // this will return `undefined` instead of unknown translation key...
}

Full Changelog: 1.1.3...1.2.0