<?php
$months = __('months', true);
$days = __('days', true);
$delete_text = __('gridConfirmationTitle', true);
$empty_title = __('gridActionEmptyTitle', true);
$empty_body = __('gridActionEmptyBody', true);
if(isset($_GET['page']))
{
	switch ($_GET['page']) {
		case "queue":
			$delete_text = __('lblDeleteQueueConfirmation', true);
			$empty_title = __('gridQueueActionEmptyTitle', true);
			$empty_body = __('gridQueueActionEmptyBody', true);
		break;
		case "list":
			$delete_text = __('lblDeleteListConfirmation', true);
			$empty_title = __('gridListActionEmptyTitle', true);
			$empty_body = __('gridListActionEmptyBody', true);
		break;
		case "message":
			$delete_text = __('lblDeleteMessageConfirmation', true);
			$empty_title = __('gridMessageActionEmptyTitle', true);
			$empty_body = __('gridMessageActionEmptyBody', true);
			break;
		case "subscriber":
			$delete_text = __('lblDeleteSubscriberConfirmation', true);
			$empty_title = __('gridSubscriberActionEmptyTitle', true);
			$empty_body = __('gridSubscriberActionEmptyBody', true);
			break;
	}
}
?>
if (jQuery_1_8_2.datagrid !== undefined) {
	jQuery_1_8_2.extend(jQuery_1_8_2.datagrid.messages, {
		empty_result: "<?php __('gridEmptyResult'); ?>",
		choose_action: "<?php __('gridChooseAction'); ?>",
		goto_page: "<?php __('gridGotoPage'); ?>",
		total_items: "<?php __('gridTotalItems'); ?>",
		items_per_page: "<?php __('gridItemsPerPage'); ?>",
		prev_page: "<?php __('gridPrevPage'); ?>",
		prev: "<?php __('gridPrev'); ?>",
		next_page: "<?php __('gridNextPage'); ?>",
		next: "<?php __('gridNext'); ?>",
		month_names: ['<?php echo $months[1]; ?>', '<?php echo $months[2]; ?>', '<?php echo $months[3]; ?>', '<?php echo $months[4]; ?>', '<?php echo $months[5]; ?>', '<?php echo $months[6]; ?>', '<?php echo $months[7]; ?>', '<?php echo $months[8]; ?>', '<?php echo $months[9]; ?>', '<?php echo $months[10]; ?>', '<?php echo $months[11]; ?>', '<?php echo $months[12]; ?>'],
		day_names: ['<?php echo $days[1]; ?>', '<?php echo $days[2]; ?>', '<?php echo $days[3]; ?>', '<?php echo $days[4]; ?>', '<?php echo $days[5]; ?>', '<?php echo $days[6]; ?>', '<?php echo $days[0]; ?>'],
		delete_title: "<?php __('gridDeleteConfirmation'); ?>",
		delete_text: "<?php echo $delete_text; ?>",
		action_title: "<?php __('gridActionTitle'); ?>",
		action_empty_title: "<?php echo $empty_title;?>",
		action_empty_body: "<?php echo $empty_body;?>",
		btn_ok: "<?php __('gridBtnOk'); ?>",
		btn_cancel: "<?php __('gridBtnCancel'); ?>",
		btn_delete: "<?php __('gridBtnDelete'); ?>"
	});
}

if (jQuery_1_8_2.multilang !== undefined) {
	jQuery_1_8_2.extend(jQuery_1_8_2.multilang.messages, {
		tooltip: "<?php __('multilangTooltip'); ?>"
	});
}

if (nsApp !== undefined) {
	nsApp = jQuery_1_8_2.extend(nsApp, {
		locale: {
			titles: <?php echo pjAppController::jsonEncode(__('button_titles', true)); ?>
		}
	});
}