applyAPItoObject = (object) => {
    let alreadySetted = true

    // attach to itself if not provided
    for (const method in api) {
      if (Object.prototype.hasOwnProperty.call(api, method)) {
        const alias = api[method]

        // be kind rewind, or better not touch anything already existing
        if (!object[alias]) {
          alreadySetted = false
          object[alias] = i18n[method].bind(object)
        }
      }
    }

    // set initial locale if not set
    if (!object.locale) {
      object.locale = defaultLocale
    }

    // escape recursion
    if (alreadySetted) {
      return
    }

    // attach to response if present (ie. in express)
    if (object.res) {
      applyAPItoObject(object.res)
    }

    // attach to locals if present (ie. in express)
    if (object.locals) {
      applyAPItoObject(object.locals)
    }
  }
registers all public API methods to a given response object when not already declared