insert(locale, localizations, conflictResolution) {
    const Class = shaka.ui.Localization;
    const ConflictResolution = shaka.ui.Localization.ConflictResolution;
    const FakeEvent = shaka.util.FakeEvent;

    // Normalize the locale so that matching will be easier.
    locale = shaka.util.LanguageUtils.normalize(locale);

    // Default |conflictResolution| to |USE_NEW| if it was not given. Doing it
    // here because it would create too long of a parameter list.
    if (conflictResolution === undefined) {
      conflictResolution = ConflictResolution.USE_NEW;
    }

    // Make sure we have an entry for the locale because we are about to
    // write to it.
    const table = this.localizations_.get(locale) || new Map();
    localizations.forEach((value, id) => {
      // Set the value if we don't have an old value or if we are to replace
      // the old value with the new value.
      if (!table.has(id) || conflictResolution == ConflictResolution.USE_NEW) {
        table.set(id, value);
      }
    });
    this.localizations_.set(locale, table);

    // The data we use to make our map may have changed, update the map we pull
    // data from.
    this.updateCurrentMap_();

    this.dispatchEvent(new FakeEvent(Class.LOCALE_UPDATED));

    return this;
  }
Insert a set of localizations for a single locale. This will amend the
existing localizations for the given locale.

@param {string} locale
  The locale that the localizations should be added to.
@param {!Map<string, string>} localizations
  A mapping of id to localized text that should used to modify the internal
  collection of localizations.
@param {shaka.ui.Localization.ConflictResolution=} conflictResolution
  The strategy used to resolve conflicts when the id of an existing entry
  matches the id of a new entry. Default to |USE_NEW|, where the new
  entry will replace the old entry.
@return {!shaka.ui.Localization}
  Returns |this| so that calls can be chained.
@export