src/Charcoal/Property/AbstractProperty.php
protected function l10nVal($val, $lang = null)
    {
        if (!is_string($lang)) {
            if (is_array($lang) && isset($lang['lang'])) {
                $lang = $lang['lang'];
            } else {
                $lang = $this->translator()->getLocale();
            }
        }

        if (isset($val[$lang])) {
            return $val[$lang];
        } else {
            return null;
        }
    }
protected function l10nVal($val, $lang = null)
    {
        if (!is_string($lang)) {
            if (is_array($lang) && isset($lang['lang'])) {
                $lang = $lang['lang'];
            } else {
                $lang = $this->translator()->getLocale();
            }
        }

        if (isset($val[$lang])) {
            return $val[$lang];
        } else {
            return null;
        }
    }
protected function l10nVal ( $ val , $ lang = null ) { if ( ! is_string ( $ lang ) ) { if ( is_array ( $ lang ) && isset ( $ lang [ 'lang' ] ) ) { $ lang = $ lang [ 'lang' ] ; } else { $ lang = $ this -> translator ( ) -> getLocale ( ) ; } } if ( isset ( $ val [ $ lang ] ) ) { return $ val [ $ lang ] ; } else { return null ; } }
Attempt to get the multilingual value in the requested language.

@param  mixed $val  The multilingual value to lookup.
@param  mixed $lang The language to return the value in.
@return string|null
Attempt to get the multilingual value in the requested language .