static normalize(locale) {
    const LanguageUtils = shaka.util.LanguageUtils;

    const privateUsePrefix = 'x-';
    const [languageRegion = '', privateUseSuffix = ''] =
     locale.split(`-${privateUsePrefix}`);
    const [languageCode = '', regionCode = ''] = languageRegion.split('-');

    // We are only going to use the language, the region and the private use part (as per https://datatracker.ietf.org/doc/html/rfc5646).
    // Anything else is thrown away.
    const privateUse = privateUseSuffix ?
        `${privateUsePrefix}${privateUseSuffix}` : '';

    // Convert the language to lower case. It is standard for the language code
    // to be in lower case, but it will also make the map look-up easier.
    let language = languageCode.toLowerCase();
    language = LanguageUtils.isoMap_.get(language) || language;

    // Convert the region to upper case. It is standard for the region to be in
    // upper case. If there is no upper code, then it will be an empty string
    // and this will be a no-op.
    const region = regionCode.toUpperCase();

    return `${region ? `${language}-${region}` : language}${
        privateUse ? `-${privateUse}` : ''}`;
  }
Normalize a locale. This will take a locale and canonicalize it to a state
that we are prepared to work with.

We only support with:
  - language
  - language-REGION

If given a dialect, we will discard it. We will convert any 3-character
codes to 2-character codes. We will force language codes to lowercase and
region codes to uppercase.

@param {string} locale
@return {string}
@export