original_string: public function prepareI18nModels()
      {
          $mI18n = $this->getJoined()->all();
          $modelsI18n = [];
          foreach ($mI18n as $modelI18n) {
              $modelI18n->correctSelectedText();
              $modelsI18n[$modelI18n->lang_code] = $modelI18n;
          }
          foreach ($this->languages as $langCode => $lang) {
              if (empty($modelsI18n[$langCode])) {
                  $newI18n = $this->module->model(static::I18N_JOIN_MODEL);
                  $modelsI18n[$langCode] = $newI18n->loadDefaultValues();
                  $modelsI18n[$langCode]->lang_code = $langCode;
              }
          }
          return $modelsI18n;
      }
code: public function prepareI18nModels()
      {
          $mI18n = $this->getJoined()->all();
          $modelsI18n = [];
          foreach ($mI18n as $modelI18n) {
              $modelI18n->correctSelectedText();
              $modelsI18n[$modelI18n->lang_code] = $modelI18n;
          }
          foreach ($this->languages as $langCode => $lang) {
              if (empty($modelsI18n[$langCode])) {
                  $newI18n = $this->module->model(static::I18N_JOIN_MODEL);
                  $modelsI18n[$langCode] = $newI18n->loadDefaultValues();
                  $modelsI18n[$langCode]->lang_code = $langCode;
              }
          }
          return $modelsI18n;
      }
code_tokens: public function prepareI18nModels ( ) { $ mI18n = $ this -> getJoined ( ) -> all ( ) ; $ modelsI18n = [ ] ; foreach ( $ mI18n as $ modelI18n ) { $ modelI18n -> correctSelectedText ( ) ; $ modelsI18n [ $ modelI18n -> lang_code ] = $ modelI18n ; } foreach ( $ this -> languages as $ langCode => $ lang ) { if ( empty ( $ modelsI18n [ $ langCode ] ) ) { $ newI18n = $ this -> module -> model ( static :: I18N_JOIN_MODEL ) ; $ modelsI18n [ $ langCode ] = $ newI18n -> loadDefaultValues ( ) ; $ modelsI18n [ $ langCode ] -> lang_code = $ langCode ; } } return $ modelsI18n ; }
docstring: Prepare i18n-models array, create new if need.
  No error if new language add or not found joined record - will create new i18n-model with default values.
  @return array in format langCode => i18n-model's object
docstring_tokens: Prepare i18n - models array create new if need . No error if new language add or not found joined record - will create new i18n - model with default values .