library/Garp/Model/Behavior/Translatable.php
protected function _saveI18nRecord($language, Garp_Model_Db $model, array $pKeys) {
        $data = $this->_extractDataForLanguage($language, $model);
        // If no data was given in the specified language, we don't save anything
        if (empty($data)) {
            return;
        }
        // Add the language...
        $data[self::LANG_COLUMN] = $language;
        // ...and foreign keys
        $data = $this->_mergeDataWithForeignKeyColumns($data, $model, $pKeys);

        $i18nModel = $this->getI18nModel($model);
        $row = $this->_fetchLocalizedRow($language, $model, $pKeys) ?: $i18nModel->createRow();

        if (!$row->isConnected()) {
            $row->setTable($i18nModel);
        }
        $row->setFromArray($data);
        if (!$row->save()) {
            throw new Garp_Model_Behavior_Exception(
                sprintf(self::SAVE_IN_LANG_EXCEPTION, $language)
            );
        }
        return true;
    }
protected function _saveI18nRecord($language, Garp_Model_Db $model, array $pKeys) {
        $data = $this->_extractDataForLanguage($language, $model);
        // If no data was given in the specified language, we don't save anything
        if (empty($data)) {
            return;
        }
        // Add the language...
        $data[self::LANG_COLUMN] = $language;
        // ...and foreign keys
        $data = $this->_mergeDataWithForeignKeyColumns($data, $model, $pKeys);

        $i18nModel = $this->getI18nModel($model);
        $row = $this->_fetchLocalizedRow($language, $model, $pKeys) ?: $i18nModel->createRow();

        if (!$row->isConnected()) {
            $row->setTable($i18nModel);
        }
        $row->setFromArray($data);
        if (!$row->save()) {
            throw new Garp_Model_Behavior_Exception(
                sprintf(self::SAVE_IN_LANG_EXCEPTION, $language)
            );
        }
        return true;
    }
protected function _saveI18nRecord ( $ language , Garp_Model_Db $ model , array $ pKeys ) { $ data = $ this -> _extractDataForLanguage ( $ language , $ model ) ; // If no data was given in the specified language, we don't save anything if ( empty ( $ data ) ) { return ; } // Add the language... $ data [ self :: LANG_COLUMN ] = $ language ; // ...and foreign keys $ data = $ this -> _mergeDataWithForeignKeyColumns ( $ data , $ model , $ pKeys ) ; $ i18nModel = $ this -> getI18nModel ( $ model ) ; $ row = $ this -> _fetchLocalizedRow ( $ language , $ model , $ pKeys ) ? : $ i18nModel -> createRow ( ) ; if ( ! $ row -> isConnected ( ) ) { $ row -> setTable ( $ i18nModel ) ; } $ row -> setFromArray ( $ data ) ; if ( ! $ row -> save ( ) ) { throw new Garp_Model_Behavior_Exception ( sprintf ( self :: SAVE_IN_LANG_EXCEPTION , $ language ) ) ; } return true ; }
Save a new i18n record in the given language

@param String $language
@param Garp_Model_Db $model
@param Array $pKeys
@return Boolean
Save a new i18n record in the given language