setLang (lang) {
    this.langChanged = true
    this.configObj.pref('lang', lang)
    const $editDialog = $id('se-edit-prefs')
    $editDialog.setAttribute('lang', lang)
    const oldLayerName = $id('#layerlist')
      ? $id('#layerlist').querySelector('tr.layersel td.layername').textContent
      : ''
    const renameLayer =
      oldLayerName === this.i18next.t('notification.common.layer') + ' 1'

    this.setTitles()

    if (renameLayer) {
      this.svgCanvas.renameCurrentLayer(
        this.i18next.t('notification.common.layer') + ' 1'
      )
      this.layersPanel.populateLayers()
    }

    this.svgCanvas.runExtensions(
      'langChanged',
      /** @type {module:svgcanvas.SvgCanvas#event:ext_langChanged} */ lang
    )
  }
@function module:SVGthis.setLang
@param {string} lang The language code
@param {module:locale.LocaleStrings} allStrings See {@tutorial LocaleDocs}
@fires module:svgcanvas.SvgCanvas#event:ext_langReady
@fires module:svgcanvas.SvgCanvas#event:ext_langChanged
@returns {void} A Promise which resolves to `undefined`