code/libraries/joomlatools/library/translator/locator/factory.php
public function registerLocator($identifier)
    {
        $result = false;

        $identifier = $this->getIdentifier($identifier);
        $class      = $this->getObject('manager')->getClass($identifier);

        if(!$class || !array_key_exists('KTranslatorLocatorInterface', class_implements($class)))
        {
            throw new UnexpectedValueException(
                'Locator: '.$identifier.' does not implement KTranslatorLocatorInterface'
            );
        }

        $name = $class::getName();

        if (!empty($name) && !$this->isRegistered($name)) {
            $this->__locators[$name] = $identifier;
        }

        return $result;
    }
public function registerLocator($identifier)
    {
        $result = false;

        $identifier = $this->getIdentifier($identifier);
        $class      = $this->getObject('manager')->getClass($identifier);

        if(!$class || !array_key_exists('KTranslatorLocatorInterface', class_implements($class)))
        {
            throw new UnexpectedValueException(
                'Locator: '.$identifier.' does not implement KTranslatorLocatorInterface'
            );
        }

        $name = $class::getName();

        if (!empty($name) && !$this->isRegistered($name)) {
            $this->__locators[$name] = $identifier;
        }

        return $result;
    }
public function registerLocator ( $ identifier ) { $ result = false ; $ identifier = $ this -> getIdentifier ( $ identifier ) ; $ class = $ this -> getObject ( 'manager' ) -> getClass ( $ identifier ) ; if ( ! $ class || ! array_key_exists ( 'KTranslatorLocatorInterface' , class_implements ( $ class ) ) ) { throw new UnexpectedValueException ( 'Locator: ' . $ identifier . ' does not implement KTranslatorLocatorInterface' ) ; } $ name = $ class :: getName ( ) ; if ( ! empty ( $ name ) && ! $ this -> isRegistered ( $ name ) ) { $ this -> __locators [ $ name ] = $ identifier ; } return $ result ; }
Register a locator

Function prevents from registering the locator twice

@param string $identifier A locator identifier string
@throws UnexpectedValueException
@return bool Returns TRUE on success, FALSE on failure.
Register a locator