WordPress at a glance
function is not described

Symfony\Component\CssSelector\XPath

Translator::registerExtension() public WC 1.0

Registers an extension.

{} It's a method of the class: Translator{}

No Hooks.

Return

$this.

Usage

$Translator = new Translator();
$Translator->registerExtension( $extension );
$extension(Extension\ExtensionInterface) (required)
-

Code of Translator::registerExtension() WC 5.4.1

<?php
public function registerExtension(Extension\ExtensionInterface $extension)
{
    $this->extensions[$extension->getName()] = $extension;

    $this->nodeTranslators = array_merge($this->nodeTranslators, $extension->getNodeTranslators());
    $this->combinationTranslators = array_merge($this->combinationTranslators, $extension->getCombinationTranslators());
    $this->functionTranslators = array_merge($this->functionTranslators, $extension->getFunctionTranslators());
    $this->pseudoClassTranslators = array_merge($this->pseudoClassTranslators, $extension->getPseudoClassTranslators());
    $this->attributeMatchingTranslators = array_merge($this->attributeMatchingTranslators, $extension->getAttributeMatchingTranslators());

    return $this;
}