function localeMatch(browserLang, metaLocale) {
  const bParts = browserLang.toLowerCase().split('-');
  const mParts = metaLocale.toLowerCase().split('-');
  let bi = 0;
  let mi = 0;
  while (bi < bParts.length && mi < mParts.length) {
    if (bParts[bi] === mParts[mi]) mi += 1;
    bi += 1;
  }
  return mi === mParts.length;
}
@param {string} browserLang  Language tags from RFC5646 (`[lang]-[script]-[region]-[variant]`, all parts are optional)
@param {string} locale  `<lang>`, `<lang>-<region>`