def replace(language, items):
    """Replace all items for a given language.

        Items are given as (path, identifier) tuples.

        Note that order will be assigned naively. It is assumed that
        items are given in depth-first order.
        """
