static areLocaleCompatible(locale1, locale2) {
    const LanguageUtils = shaka.util.LanguageUtils;

    // Even through they SHOULD already be normalized, let's just be safe and
    // do it again.
    locale1 = LanguageUtils.normalize(locale1);
    locale2 = LanguageUtils.normalize(locale2);

    return locale1 == locale2;
  }
Check if |locale1| and |locale2| are locale-compatible.

Locale-compatible is defined as all components in each locale match. Since
we only respect the language and region components, we only check that
the language and region components match.

Examples:
 Locale A | Locale B | Locale Compatible
 ---------------------------------------
 en-US    | en-US    | true
 en       | en-US    | false
 en-US    | en-CA    | false

@param {string} locale1
@param {string} locale2
@return {boolean}
@export