protected function _save($domain, $singular, $plural = null, $context = null, $refs = null)
    {
        $model = $this->_model();

        foreach ($this->_languages as $locale) {
            $found = $model->find()
                ->where(compact('domain', 'locale', 'singular'))
                ->count();

            if (!$found) {
                $entity = $model->newEntity(compact(
                    'domain',
                    'locale',
                    'singular',
                    'plural',
                    'context',
                    'refs'
                ), ['guard' => false]);

                $model->save($entity);
            }
        }
    }
protected function _save($domain, $singular, $plural = null, $context = null, $refs = null)
    {
        $model = $this->_model();

        foreach ($this->_languages as $locale) {
            $found = $model->find()
                ->where(compact('domain', 'locale', 'singular'))
                ->count();

            if (!$found) {
                $entity = $model->newEntity(compact(
                    'domain',
                    'locale',
                    'singular',
                    'plural',
                    'context',
                    'refs'
                ), ['guard' => false]);

                $model->save($entity);
            }
        }
    }
protected function _save ( $ domain , $ singular , $ plural = null , $ context = null , $ refs = null ) { $ model = $ this -> _model ( ) ; foreach ( $ this -> _languages as $ locale ) { $ found = $ model -> find ( ) -> where ( compact ( 'domain' , 'locale' , 'singular' ) ) -> count ( ) ; if ( ! $ found ) { $ entity = $ model -> newEntity ( compact ( 'domain' , 'locale' , 'singular' , 'plural' , 'context' , 'refs' ) , [ 'guard' => false ] ) ; $ model -> save ( $ entity ) ; } } }
Save translation record to database.

@param string $domain Domain name
@param string $singular Singular message id.
@param string|null $plural Plural message id.
@param string|null $context Context.
@param string|null $refs Source code references.

@return void
Save translation record to database .