/**
  * Creates a new CsCategories model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  * @return mixed
  */
 public function actionCreate()
 {
     $model = new CsCategories();
     $model_trans = new CsCategoriesTranslation();
     if ($model->load(Yii::$app->request->post()) and $model_trans->load(Yii::$app->request->post())) {
         if ($model->save()) {
             $model_trans->category_id = $model->id;
             $model_trans->orig_name = $model->name;
             $model_trans->save();
             return $this->redirect(['view', 'id' => $model->id]);
         }
     } else {
         return $this->render('create', ['model' => $model, 'model_trans' => $model_trans]);
     }
 }