Hi,
Great plugin. Thx. I found that when you display items (file helper.php), you take value direct from field from table for this two variable (e_type and e_status), so they always in english. So I make small changes in your function get_realestate_attributes() in helper.php.
if(@$detail['e_type'] != "") {
// Igor added for displaying on all languages - start
if(@$detail['e_type'] == 'FOR RENT') { $e_type='For rent'; }
if(@$detail['e_type'] == 'FOR SALE') { $e_type='For sale'; }
// Igor added for displaying on all languages - end
$return['attributes']['type'] = array(
'label' =>__('Type', 'realestate_attributes')
// Igor changed for displaying on all languages - start
//,'value' => @$detail['e_type']
,'value' =>__($e_type, 'realestate_attributes')
// Igor changed for displaying on all languages - end
);
}
and
if(@$detail['e_status'] != "") {
// Igor added for displaying on all languages - start
if(@$detail['e_status'] == 'NEW CONSTRUCTION') { $e_status='New construction'; }
if(@$detail['e_status'] == 'TO RENOVATE') { $e_status='To renovate'; }
if(@$detail['e_status'] == 'GOOD CONDITION') { $e_status='Good condition'; }
// Igor added for displaying on all languages - end
$return['attributes']['status'] = array(
'label' =>__('Status', 'realestate_attributes')
// Igor changed for displaying on all languages - start
//,'value' => @$detail['e_status']
,'value' =>__($e_status, 'realestate_attributes')
// Igor changed for displaying on all languages - end
);
}
Because that is static value, now it use language file to translate it to other languages.
Best regards