static getLocaleForText(stream) {
    const LanguageUtils = shaka.util.LanguageUtils;

    const ContentType = shaka.util.ManifestParserUtils.ContentType;
    goog.asserts.assert(
        stream.type == ContentType.TEXT,
        'Can only get language from text streams');

    const language = stream.language || 'und';
    return LanguageUtils.normalize(language);
  }
Get the normalized language of the given text stream. Will return 'und' if
a language is not found on the text stream.

This should always be used to get the language from a text stream.

@param {shaka.extern.Stream} stream
@return {string}
@export