Skip to content

0.12.0 - Feature Release

Compare
Choose a tag to compare
@mashpie mashpie released this 16 Aug 14:30
· 125 commits to master since this release

Added

  • backward compatible default to singleton with const i18n = require('i18n')
  • create an instance of i18n by const i18n = new I18n()

Example:

/**
 * require I18n with capital I as constructor
 */
const { I18n } = require("i18n");

/**
 * create a new instance with it's configuration
 */
const i18n = new I18n({
    locales:['en', 'de'],
    directory: __dirname + '/locales'
});