src/phpDocumentor/Translator/Translator.php
public function addTranslationsUsingPattern(
        $baseDir,
        $textDomain = self::DEFAULT_DOMAIN,
        $pattern = self::DEFAULT_PATTERN
    ) {
        if ($textDomain !== self::DEFAULT_DOMAIN && $pattern === self::DEFAULT_PATTERN) {
            $pattern = $textDomain . '.' . $pattern;
        }

        parent::addTranslationFilePattern(self::TRANSLATION_FILE_TYPE, $baseDir, $pattern, $textDomain);

        $this->messages = array();

        return $this;
    }
public function addTranslationsUsingPattern(
        $baseDir,
        $textDomain = self::DEFAULT_DOMAIN,
        $pattern = self::DEFAULT_PATTERN
    ) {
        if ($textDomain !== self::DEFAULT_DOMAIN && $pattern === self::DEFAULT_PATTERN) {
            $pattern = $textDomain . '.' . $pattern;
        }

        parent::addTranslationFilePattern(self::TRANSLATION_FILE_TYPE, $baseDir, $pattern, $textDomain);

        $this->messages = array();

        return $this;
    }
public function addTranslationsUsingPattern ( $ baseDir , $ textDomain = self :: DEFAULT_DOMAIN , $ pattern = self :: DEFAULT_PATTERN ) { if ( $ textDomain !== self :: DEFAULT_DOMAIN && $ pattern === self :: DEFAULT_PATTERN ) { $ pattern = $ textDomain . '.' . $ pattern ; } parent :: addTranslationFilePattern ( self :: TRANSLATION_FILE_TYPE , $ baseDir , $ pattern , $ textDomain ) ; $ this -> messages = array ( ) ; return $ this ; }
Adds a series of translation files given a pattern.

This method will search the base directory for a series of files matching the given pattern (where %s is replaces
by the two-letter locale shorthand) and adds any translations to the translation table.

@param string $baseDir    Directory to search in (not-recursive)
@param string $textDomain The domain to assign the translation messages to.
@param string $pattern    The pattern used to load files for all languages, one variable `%s` is supported and
is replaced with the {@link http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes ISO-639-1 code} for each
locale that is requested by the translate method.

@internal this method is not to be used by consumers; it is an extension of the Zend Translator component
and is overridden to clear the messages caching array so it may be rebuild.

@see self::addTranslationFolder() to provide a series of translation files.

@return $this|ZendTranslator
Adds a series of translation files given a pattern .