diff --git a/importexport/inc/class.importexport_export_csv.inc.php b/importexport/inc/class.importexport_export_csv.inc.php index 15ef244a3c..04707f7a9a 100644 --- a/importexport/inc/class.importexport_export_csv.inc.php +++ b/importexport/inc/class.importexport_export_csv.inc.php @@ -129,6 +129,11 @@ class importexport_export_csv implements importexport_iface_export_record // begin with fieldnames ? if ($this->num_of_records == 0 && $this->csv_options['begin_with_fieldnames'] ) { + if($this->csv_options['begin_with_fieldnames'] == 'label') { + foreach($this->mapping as $field => &$label) { + $label = lang($label); + } + } $mapping = ! empty( $this->mapping ) ? $this->mapping : array_keys ( $this->record ); $mapping = $this->translation->convert( $mapping, $this->translation->charset(), $this->csv_charset ); fputcsv( $this->handle ,$mapping ,$this->csv_options['delimiter'], $this->csv_options['enclosure'] ); diff --git a/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php b/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php index e977dea96c..784a00d101 100644 --- a/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_export_csv.inc.php @@ -99,7 +99,7 @@ class importexport_wizard_basic_export_csv foreach($this->export_fields as $field => $name) { $content['fields'][] = array( 'field' => $field, - 'name' => $name, + 'name' => lang($name), ); if($content['mapping'][$field]) { $content['fields']['export'][$row] = $field;