Load the translations for the app for headings

This commit is contained in:
Nathan Gray 2011-01-12 17:02:43 +00:00
parent 95906905e4
commit 0efb958fa1
2 changed files with 7 additions and 0 deletions

View File

@ -130,6 +130,10 @@ 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') {
// Load translations for app
list($appname, $part2) = explode('_', get_class($_record));
if(!$GLOBALS['egw_info']['apps'][$appname]) $appname .= $part2; // Handle apps with _ in the name
translation::add_app($appname);
foreach($this->mapping as $field => &$label) {
$label = lang($label);
}

View File

@ -59,6 +59,9 @@ class importexport_wizard_basic_export_csv
'wizard_step30' => lang('Choose fields to export'),
'wizard_step40' => lang('Choose seperator and charset'),
);
list($appname, $part2) = explode('_', get_class($this));
if(!$GLOBALS['egw_info']['apps'][$appname]) $appname .= $part2; // Handle apps with _ in the name
translation::add_app($appname);
}
/**