forked from extern/egroupware
Translation of field labels
This commit is contained in:
parent
5e9d01e176
commit
8615b3c9fa
@ -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'] );
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user