Permalink
Browse files

Added new values to multi-lingual object properties in object array t…

…ransformations. value_current_lang returns the property value in the active language
  • Loading branch information...
1 parent bc17c84 commit 1783d7b7afbfd84b52e48246afea6a5f4aa10544 @integry committed Mar 3, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 application/model/system/MultilingualObject.php
@@ -139,6 +139,7 @@ public static function transformArray($array, ARSchema $schema)
reset($data);
$array[$fieldName . '_lang'] = !empty($data[self::$currentLanguageCode]) ? $data[self::$currentLanguageCode] : (!empty($array[$fieldName]) ? $array[$fieldName] : $data[key($data)]); /* use data from any language if the default language is empty */
+ $array[$fieldName . '_current_lang'] = !empty($data[self::$currentLanguageCode]) ? $data[self::$currentLanguageCode] : '';
}
}

0 comments on commit 1783d7b

Please sign in to comment.