putLocale = async function (givenParam, goodLangs) {
  if (givenParam) {
    langParam = givenParam
  } else if (navigator.userLanguage) { // Explorer
    langParam = navigator.userLanguage
  } else if (navigator.language) { // FF, Opera, ...
    langParam = navigator.language
  }

  // Set to English if language is not in list of good langs
  if (!goodLangs.includes(langParam) && langParam !== 'test') {
    langParam = 'en'
  }
  const module = await import(`./locale/lang.${encodeURIComponent(langParam)}.js`)
  i18next.init({
    lng: langParam,
    debug: false,
    resources: {
      [langParam]: {
        translation: module.default
      }
    }
  })
  return { langParam, i18next }
}
@function module:locale.putLocale
@param {string} givenParam
@param {string[]} goodLangs
@fires module:svgcanvas.SvgCanvas#event:ext_addLangData
@fires module:svgcanvas.SvgCanvas#event:ext_langReady
@fires module:svgcanvas.SvgCanvas#event:ext_langChanged
@returns {Promise<module:locale.LangAndData>} Resolves to result of {@link module:locale.readLang}