public function setMultilang($isoCode)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");

            return $this;
        }
        //====================================================================//
        // Safety Checks ==> Verify Language ISO Code
        if (!is_string($isoCode) || (strlen($isoCode) < 2)) {
            Splash::log()->err("Language ISO Code is Invalid");

            return $this;
        }
        //====================================================================//
        // Safety Checks ==> Verify Field Type is Allowed
        if (!in_array($this->new->type, array(SPL_T_VARCHAR, SPL_T_TEXT), true)) {
            Splash::log()->err("ErrFieldsWrongLang");
            Splash::log()->err("Received: ".$this->new->type);

            return $this;
        }

        //====================================================================//
        // Default Language ==> Only Setup Language Option
        $this->addOption("language", $isoCode);
        //====================================================================//
        // Other Language ==> Complete Field Setup
        if ($isoCode != $this->dfLanguage) {
            $this->identifier($this->new->id."_".$isoCode);
            if (!empty($this->new->itemtype)) {
                $this->microData($this->new->itemtype."/".$isoCode, $this->new->itemprop);
            }
        }

        return $this;
    }
public function setMultilang($isoCode)
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");

            return $this;
        }
        //====================================================================//
        // Safety Checks ==> Verify Language ISO Code
        if (!is_string($isoCode) || (strlen($isoCode) < 2)) {
            Splash::log()->err("Language ISO Code is Invalid");

            return $this;
        }
        //====================================================================//
        // Safety Checks ==> Verify Field Type is Allowed
        if (!in_array($this->new->type, array(SPL_T_VARCHAR, SPL_T_TEXT), true)) {
            Splash::log()->err("ErrFieldsWrongLang");
            Splash::log()->err("Received: ".$this->new->type);

            return $this;
        }

        //====================================================================//
        // Default Language ==> Only Setup Language Option
        $this->addOption("language", $isoCode);
        //====================================================================//
        // Other Language ==> Complete Field Setup
        if ($isoCode != $this->dfLanguage) {
            $this->identifier($this->new->id."_".$isoCode);
            if (!empty($this->new->itemtype)) {
                $this->microData($this->new->itemtype."/".$isoCode, $this->new->itemprop);
            }
        }

        return $this;
    }
public function setMultilang ( $ isoCode ) { //====================================================================// // Safety Checks ==> Verify a new Field Exists if ( empty ( $ this -> new ) ) { Splash :: log ( ) -> err ( "ErrFieldsNoNew" ) ; return $ this ; } //====================================================================// // Safety Checks ==> Verify Language ISO Code if ( ! is_string ( $ isoCode ) || ( strlen ( $ isoCode ) < 2 ) ) { Splash :: log ( ) -> err ( "Language ISO Code is Invalid" ) ; return $ this ; } //====================================================================// // Safety Checks ==> Verify Field Type is Allowed if ( ! in_array ( $ this -> new -> type , array ( SPL_T_VARCHAR , SPL_T_TEXT ) , true ) ) { Splash :: log ( ) -> err ( "ErrFieldsWrongLang" ) ; Splash :: log ( ) -> err ( "Received: " . $ this -> new -> type ) ; return $ this ; } //====================================================================// // Default Language ==> Only Setup Language Option $ this -> addOption ( "language" , $ isoCode ) ; //====================================================================// // Other Language ==> Complete Field Setup if ( $ isoCode != $ this -> dfLanguage ) { $ this -> identifier ( $ this -> new -> id . "_" . $ isoCode ) ; if ( ! empty ( $ this -> new -> itemtype ) ) { $ this -> microData ( $ this -> new -> itemtype . "/" . $ isoCode , $ this -> new -> itemprop ) ; } } return $ this ; }
Configure Current Field with Multilangual Options

@param null|string $isoCode Language ISO Code (i.e en_US | fr_FR)

@return $this
Configure Current Field with Multilangual Options