function getLangOfInnerText(node) {
    let curNodeLang = null;

    // If we find multiple languages within this element, return null.
    for (const child of node.querySelectorAll('*')) {
      if (!child.textContent) continue;

      const childLang = child.closest('[lang]')?.getAttribute('lang');
      if (!childLang) continue;

      if (!curNodeLang) {
        curNodeLang = childLang;
        continue;
      }

      if (curNodeLang.split('-')[0] !== childLang.split('-')[0]) {
        return null;
      }
    }

    return curNodeLang ?? node.closest('[lang]')?.getAttribute('lang') ?? null;
  }
@param {HTMLElement|SVGElement} node
@return {string|null}