How to use poi-plugin-translator - 2 common examples

To help you get started, we’ve selected a few poi-plugin-translator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github poooi / poi / views / env-parts / i18next.es View on Github external
i18next.addResourceBundleDebounce = (...props) => {
  i18next.addResourceBundle(...props, { silent: true })
  i18next.emitResourceAddedDebounce()
}

window.i18n.resources = {
  __: str => spacing(str),
  translate: (locale, str) => spacing(str),
  setLocale: str => str,
}

// inject translator for English names
if (!isMain && config.get('plugin.poi-plugin-translator.enable', false)) {
  try {
    require('poi-plugin-translator').pluginDidLoad()
  } catch (e) {
    console.warn('poi-plugin-translator', e)
  }
}

export default i18next
github poooi / poi / views / env-parts / i18n-config.es View on Github external
devMode: false,
    })
    window.i18n[namespace].setLocale(window.language)
  }
}

window.i18n.resources = {
  __: (str) => spacing(str),
  translate: (locale, str) => spacing(str),
  setLocale: (str) => (str),
}

// inject translator for English names
if (!isMain && config.get('plugin.poi-plugin-translator.enable', false)) {
  try {
    require('poi-plugin-translator').pluginDidLoad()
  } catch (e) {
    console.warn('poi-plugin-translator', e)
  }
}

poi-plugin-translator

Translate package into English.

MIT
Latest version published 1 month ago

Package Health Score

63 / 100
Full package analysis

Popular poi-plugin-translator functions

Similar packages