controllers/I18nTranslationController.php
public function actionUpdate($message_id, $language)
    {
        $model = $this->findModel($message_id, $language);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            if(Yii::$app->request->isAjax)
                return $this->redirect(['index']);
            else
                return $this->redirect(['view', 'message_id' => $model->message_id, 'language' => $model->language]);
        } else {
            if(Yii::$app->request->isAjax)
                return $this->renderAjax('update', [
                    'model' => $model,
                ]);
            else
                return $this->render('update', [
                    'model' => $model,
                ]);
        }
    }
public function actionUpdate($message_id, $language)
    {
        $model = $this->findModel($message_id, $language);

        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            if(Yii::$app->request->isAjax)
                return $this->redirect(['index']);
            else
                return $this->redirect(['view', 'message_id' => $model->message_id, 'language' => $model->language]);
        } else {
            if(Yii::$app->request->isAjax)
                return $this->renderAjax('update', [
                    'model' => $model,
                ]);
            else
                return $this->render('update', [
                    'model' => $model,
                ]);
        }
    }
Updates an existing I18nTranslation model.
If update is successful, the browser will be redirected to the 'view' page.
@param integer $message_id
@param string $language
@return mixed