public function getSeasonName($index = null, $lang = null)
    {
        $key = ($lang ? : $this->lang);

        // fall back to first language available
        if (!isset($this->seasonNames[$key])) {
            $key = key($this->seasonNames);
        }
        if ($index === null) {
            $index = $this->getSeason();
        }
        if ($index <= 0) {
            $index += count($this->seasonNames[$key]);
        }
        $idx = $index - 1;

        return $this->seasonNames[$key][$idx];
    }
public function getSeasonName($index = null, $lang = null)
    {
        $key = ($lang ? : $this->lang);

        // fall back to first language available
        if (!isset($this->seasonNames[$key])) {
            $key = key($this->seasonNames);
        }
        if ($index === null) {
            $index = $this->getSeason();
        }
        if ($index <= 0) {
            $index += count($this->seasonNames[$key]);
        }
        $idx = $index - 1;

        return $this->seasonNames[$key][$idx];
    }
public function getSeasonName ( $ index = null , $ lang = null ) { $ key = ( $ lang ? : $ this -> lang ) ; // fall back to first language available if ( ! isset ( $ this -> seasonNames [ $ key ] ) ) { $ key = key ( $ this -> seasonNames ) ; } if ( $ index === null ) { $ index = $ this -> getSeason ( ) ; } if ( $ index <= 0 ) { $ index += count ( $ this -> seasonNames [ $ key ] ) ; } $ idx = $ index - 1 ; return $ this -> seasonNames [ $ key ] [ $ idx ] ; }
Return season name by index and language
1 = Spring, 2 = Summer,  3 = Autumn, 4 = Winter

@param int    $index season index in 1..4 range
@param string $lang language code like 'en', 'fr', etc

@return string
Return season name by index and language 1 = Spring 2 = Summer 3 = Autumn 4 = Winter