concrete/src/Page/Stack/Stack.php
public function getLocalizedStack(Section $section, $cvID = 'RECENT')
    {
        $result = null;
        $mySectionID = $this->getMultilingualSectionID();
        if ($mySectionID !== 0 && $section->getCollectionID() == $mySectionID) {
            $result = $this;
        } else {
            $neutralID = ($mySectionID === 0) ? $this->getCollectionID() : $this->getNeutralStackID();
            $db = Database::connection();
            $localizedID = $db->fetchColumn(
                '
                    select
    	               Stacks.cID
                    from
    	               Stacks
    	               inner join Pages on Stacks.cID = Pages.cID
                    where
    	               Pages.cParentID = ? and Stacks.stMultilingualSection = ?
                    limit 1
                ',
                [$neutralID, $section->getCollectionID()]
            );
            if ($localizedID) {
                $localized = static::getByID($localizedID, $cvID);
                if ($localized) {
                    $result = $localized;
                }
            }
        }

        return $result;
    }
public function getLocalizedStack(Section $section, $cvID = 'RECENT')
    {
        $result = null;
        $mySectionID = $this->getMultilingualSectionID();
        if ($mySectionID !== 0 && $section->getCollectionID() == $mySectionID) {
            $result = $this;
        } else {
            $neutralID = ($mySectionID === 0) ? $this->getCollectionID() : $this->getNeutralStackID();
            $db = Database::connection();
            $localizedID = $db->fetchColumn(
                '
                    select
    	               Stacks.cID
                    from
    	               Stacks
    	               inner join Pages on Stacks.cID = Pages.cID
                    where
    	               Pages.cParentID = ? and Stacks.stMultilingualSection = ?
                    limit 1
                ',
                [$neutralID, $section->getCollectionID()]
            );
            if ($localizedID) {
                $localized = static::getByID($localizedID, $cvID);
                if ($localized) {
                    $result = $localized;
                }
            }
        }

        return $result;
    }
public function getLocalizedStack ( Section $ section , $ cvID = 'RECENT' ) { $ result = null ; $ mySectionID = $ this -> getMultilingualSectionID ( ) ; if ( $ mySectionID !== 0 && $ section -> getCollectionID ( ) == $ mySectionID ) { $ result = $ this ; } else { $ neutralID = ( $ mySectionID === 0 ) ? $ this -> getCollectionID ( ) : $ this -> getNeutralStackID ( ) ; $ db = Database :: connection ( ) ; $ localizedID = $ db -> fetchColumn ( '
                    select
    	               Stacks.cID
                    from
    	               Stacks
    	               inner join Pages on Stacks.cID = Pages.cID
                    where
    	               Pages.cParentID = ? and Stacks.stMultilingualSection = ?
                    limit 1
                ' , [ $ neutralID , $ section -> getCollectionID ( ) ] ) ; if ( $ localizedID ) { $ localized = static :: getByID ( $ localizedID , $ cvID ) ; if ( $ localized ) { $ result = $ localized ; } } } return $ result ; }
Returns the localized version of this stack.

@param \Concrete\Core\Multilingual\Page\Section\Section $section
@param string|int $cvID

@return self|null
Returns the localized version of this stack .