@@ 214-222 (lines=9) @@ | ||
211 | } |
|
212 | ||
213 | $translation = new $this->langClassName; |
|
214 | foreach ($this->languages as $lang) { |
|
215 | foreach ($this->attributes as $attribute) { |
|
216 | $attributeName = $this->localizedPrefix . $attribute; |
|
217 | $this->setLangAttribute($this->getAttributeName($attribute, $lang), $translation->{$attributeName}); |
|
218 | if ($lang == $this->defaultLanguage) { |
|
219 | $this->setLangAttribute($attribute, $translation->{$attributeName}); |
|
220 | } |
|
221 | } |
|
222 | } |
|
223 | } |
|
224 | ||
225 | public function createLangClass() |
|
@@ 285-294 (lines=10) @@ | ||
282 | $translations = $this->indexByLanguage($related); |
|
283 | foreach ($this->languages as $lang) { |
|
284 | foreach ($this->attributes as $attribute) { |
|
285 | foreach ($translations as $translation) { |
|
286 | if ($this->getLanguageBaseName($translation->{$this->languageField}) == $lang) { |
|
287 | $attributeName = $this->localizedPrefix . $attribute; |
|
288 | $this->setLangAttribute($this->getAttributeName($attribute, $lang), $translation->{$attributeName}); |
|
289 | ||
290 | if ($lang == $this->defaultLanguage) { |
|
291 | $this->setLangAttribute($attribute, $translation->{$attributeName}); |
|
292 | } |
|
293 | } |
|
294 | } |
|
295 | } |
|
296 | } |
|
297 | } else { |