fields; } // loop through the fields foreach($fields as $f) { // first, deal with the loaded fields if ( isset($object->{$f}) ) { $line = lang($object->{$f}); if ( $line ) { $object->{$f}; } } // then, loop through the all array foreach($object->all as $key => $all_object) { if ( isset($all_object->{$f}) ) { $line = lang($all_object->{$f}); if ( $line ) { $object->all[$key]->{$f} = $line; } } } } // return the Datamapper object return $object; } } /* End of file translate.php */ /* Location: ./application/datamapper/translate.php */