src/Charcoal/Property/StringProperty.php
protected function valLabel($val, $lang = null)
    {
        if (is_string($val) && $this->hasChoice($val)) {
            $choice = $this->choice($val);
            return $this->l10nVal($choice['label'], $lang);
        } else {
            return $val;
        }
    }
protected function valLabel($val, $lang = null)
    {
        if (is_string($val) && $this->hasChoice($val)) {
            $choice = $this->choice($val);
            return $this->l10nVal($choice['label'], $lang);
        } else {
            return $val;
        }
    }
protected function valLabel ( $ val , $ lang = null ) { if ( is_string ( $ val ) && $ this -> hasChoice ( $ val ) ) { $ choice = $ this -> choice ( $ val ) ; return $ this -> l10nVal ( $ choice [ 'label' ] , $ lang ) ; } else { return $ val ; } }
Attempts to return the label for a given choice.

@param  string $val  The value to retrieve the label of.
@param  mixed  $lang The language to return the label in.
@return string Returns the label. Otherwise, returns the raw value.
Attempts to return the label for a given choice .