activity/translator/translator.php
protected function _getOverride($format, $parameters = array())
    {
        $override = $format;

        $locale = $this->getLocale();

        if (!isset($this->_overrides[$locale])) {
            $this->_overrides[$locale] = array();
        }

        if ($parameters)
        {
            $key = $this->_getOverrideKey($format, $parameters);

            if (!isset($this->_overrides[$locale][$key]))
            {
                foreach ($this->_getOverrides($format, $parameters) as $candidate)
                {
                    // Check if the override is translatable.
                    if ($this->isTranslatable($candidate))
                    {
                        $override = $candidate;
                        break;
                    }
                }

                $this->_overrides[$locale][$key] = $override;
            }
            else $override = $this->_overrides[$locale][$key];
        }

        return $override;
    }
protected function _getOverride($format, $parameters = array())
    {
        $override = $format;

        $locale = $this->getLocale();

        if (!isset($this->_overrides[$locale])) {
            $this->_overrides[$locale] = array();
        }

        if ($parameters)
        {
            $key = $this->_getOverrideKey($format, $parameters);

            if (!isset($this->_overrides[$locale][$key]))
            {
                foreach ($this->_getOverrides($format, $parameters) as $candidate)
                {
                    // Check if the override is translatable.
                    if ($this->isTranslatable($candidate))
                    {
                        $override = $candidate;
                        break;
                    }
                }

                $this->_overrides[$locale][$key] = $override;
            }
            else $override = $this->_overrides[$locale][$key];
        }

        return $override;
    }
protected function _getOverride ( $ format , $ parameters = array ( ) ) { $ override = $ format ; $ locale = $ this -> getLocale ( ) ; if ( ! isset ( $ this -> _overrides [ $ locale ] ) ) { $ this -> _overrides [ $ locale ] = array ( ) ; } if ( $ parameters ) { $ key = $ this -> _getOverrideKey ( $ format , $ parameters ) ; if ( ! isset ( $ this -> _overrides [ $ locale ] [ $ key ] ) ) { foreach ( $ this -> _getOverrides ( $ format , $ parameters ) as $ candidate ) { // Check if the override is translatable. if ( $ this -> isTranslatable ( $ candidate ) ) { $ override = $ candidate ; break ; } } $ this -> _overrides [ $ locale ] [ $ key ] = $ override ; } else $ override = $ this -> _overrides [ $ locale ] [ $ key ] ; } return $ override ; }
Get an activity format override.

@param  string $format     The activity format.
@param  array  $parameters Associative array containing parameters.
@return string The activity format override. If an override was not found, the original activity format is
returned instead.
Get an activity format override .