pdfjs/web/l10n.js
function translateFragment(element) {
    element = element || document.documentElement;

    // check all translatable children (= w/ a `data-l10n-id' attribute)
    var children = getTranslatableChildren(element);
    var elementCount = children.length;
    for (var i = 0; i < elementCount; i++) {
      translateElement(children[i]);
    }

    // translate element itself if necessary
    translateElement(element);
  }
function translateFragment(element) {
    element = element || document.documentElement;

    // check all translatable children (= w/ a `data-l10n-id' attribute)
    var children = getTranslatableChildren(element);
    var elementCount = children.length;
    for (var i = 0; i < elementCount; i++) {
      translateElement(children[i]);
    }

    // translate element itself if necessary
    translateElement(element);
  }
function translateFragment ( element ) { element = element || document . documentElement ; // check all translatable children (= w/ a `data-l10n-id' attribute) var children = getTranslatableChildren ( element ) ; var elementCount = children . length ; for ( var i = 0 ; i < elementCount ; i ++ ) { translateElement ( children [ i ] ) ; } // translate element itself if necessary translateElement ( element ) ; }
translate an HTML subtree
translate an HTML subtree