'name' => $nameHeaderLabel,
'sort' => 'name',
'direction' => CRM_Utils_Sort::DONTCARE,
- ),
- array(
- 'name' => ts('Language'),
- 'sort' => 'language',
- 'direction' => CRM_Utils_Sort::DONTCARE,
- ),
- array(
- 'name' => ts('Status'),
- 'sort' => 'status',
- 'direction' => CRM_Utils_Sort::DONTCARE,
- ),
- array(
- 'name' => ts('Created By'),
- 'sort' => 'created_by',
- 'direction' => CRM_Utils_Sort::DONTCARE,
- ),
- array(
- 'name' => ts('Created Date'),
- 'sort' => 'created_date',
- 'direction' => $unscheduledOrder,
- ),
- array(
- 'name' => ts('Sent By'),
- 'sort' => 'scheduled_by',
- 'direction' => CRM_Utils_Sort::DONTCARE,
- ),
- array(
- 'name' => ts('Scheduled'),
- 'sort' => 'scheduled_date',
- 'direction' => $scheduledOrder,
- ),
- array(
- 'name' => ts('Started'),
- 'sort' => 'start_date',
- 'direction' => CRM_Utils_Sort::DONTCARE,
- ),
+ )
+ );
+
+ if (CRM_Core_I18n::isMultilingual()) {
+ self::$_columnHeaders = array_merge(
+ self::$_columnHeaders,
+ array(
+ array(
+ 'name' => ts('Language'),
+ 'sort' => 'language',
+ 'direction' => CRM_Utils_Sort::DONTCARE,
+ )
+ )
+ );
+ }
+
+ self::$_columnHeaders = array_merge(
+ self::$_columnHeaders,
array(
- 'name' => ts('Completed'),
- 'sort' => 'end_date',
- 'direction' => $completedOrder,
- ),
+ array(
+ 'name' => ts('Status'),
+ 'sort' => 'status',
+ 'direction' => CRM_Utils_Sort::DONTCARE,
+ ),
+ array(
+ 'name' => ts('Created By'),
+ 'sort' => 'created_by',
+ 'direction' => CRM_Utils_Sort::DONTCARE,
+ ),
+ array(
+ 'name' => ts('Created Date'),
+ 'sort' => 'created_date',
+ 'direction' => $unscheduledOrder,
+ ),
+ array(
+ 'name' => ts('Sent By'),
+ 'sort' => 'scheduled_by',
+ 'direction' => CRM_Utils_Sort::DONTCARE,
+ ),
+ array(
+ 'name' => ts('Scheduled'),
+ 'sort' => 'scheduled_date',
+ 'direction' => $scheduledOrder,
+ ),
+ array(
+ 'name' => ts('Started'),
+ 'sort' => 'start_date',
+ 'direction' => CRM_Utils_Sort::DONTCARE,
+ ),
+ array(
+ 'name' => ts('Completed'),
+ 'sort' => 'end_date',
+ 'direction' => $completedOrder,
+ ),
+ )
);
if (CRM_Campaign_BAO_Campaign::isCampaignEnable()) {
self::$_columnHeaders[] = array('name' => ts('Action'));
}
}
+
+ CRM_Core_Smarty::singleton()->assign('multilingual', CRM_Core_I18n::isMultilingual());
return self::$_columnHeaders;
}
}
$opString = implode('.', $pageTypes);
+ // get languages for later conversion
+ $languages = CRM_Core_I18n::languages();
+
foreach ($rows as $key => $row) {
$actionMask = NULL;
if ($row['sms_provider_id']) {
}
// get status strings as per locale settings CRM-4411.
$rows[$key]['status'] = CRM_Mailing_BAO_MailingJob::status($row['status']);
+
+ // get language string
+ $rows[$key]['language'] = $languages[$row['language']];
+
$validLinks = $actionLinks;
if (($mailingUrl = CRM_Mailing_BAO_Mailing::getPublicViewUrl($row['id'])) != FALSE) {
$validLinks[] = array(