@@ 219-227 (lines=9) @@ | ||
216 | } |
|
217 | ||
218 | $translation = new $this->langClassName; |
|
219 | foreach ($this->languages as $lang) { |
|
220 | foreach ($this->attributes as $attribute) { |
|
221 | $attributeName = $this->localizedPrefix . $attribute; |
|
222 | $this->setLangAttribute($this->getAttributeName($attribute, $lang), $translation->{$attributeName}); |
|
223 | if ($lang == $this->defaultLanguage) { |
|
224 | $this->setLangAttribute($attribute, $translation->{$attributeName}); |
|
225 | } |
|
226 | } |
|
227 | } |
|
228 | } |
|
229 | ||
230 | public function createLangClass() |
|
@@ 290-299 (lines=10) @@ | ||
287 | $translations = $this->indexByLanguage($related); |
|
288 | foreach ($this->languages as $lang) { |
|
289 | foreach ($this->attributes as $attribute) { |
|
290 | foreach ($translations as $translation) { |
|
291 | if ($this->getLanguageBaseName($translation->{$this->languageField}) == $lang) { |
|
292 | $attributeName = $this->localizedPrefix . $attribute; |
|
293 | $this->setLangAttribute($this->getAttributeName($attribute, $lang), $translation->{$attributeName}); |
|
294 | ||
295 | if ($lang == $this->defaultLanguage) { |
|
296 | $this->setLangAttribute($attribute, $translation->{$attributeName}); |
|
297 | } |
|
298 | } |
|
299 | } |
|
300 | } |
|
301 | } |
|
302 | } else { |