本文整理汇总了PHP中Fisharebest\Webtrees\I18N::Translate方法的典型用法代码示例。如果您正苦于以下问题:PHP I18N::Translate方法的具体用法?PHP I18N::Translate怎么用?PHP I18N::Translate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\I18N
的用法示例。
在下文中一共展示了I18N::Translate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: catch
}
} catch (\ErrorException $ex) {
// Not an image, or not a valid image?
$img = '-';
}
// Is there a pending record for this file?
$exists_pending = Database::prepare("SELECT 1 FROM `##change` WHERE status='pending' AND new_gedcom LIKE CONCAT('%\n1 FILE ', :unused_file, '\n%')")->execute(array('unused_file' => Filter::escapeLike($unused_file)))->fetchOne();
// Form to create new media object in each tree
$create_form = '';
if (!$exists_pending) {
foreach ($media_trees as $media_tree) {
$create_form .= '<p><a href="" onclick="window.open(\'addmedia.php?action=showmediaform&ged=' . rawurlencode($media_tree) . '&filename=' . rawurlencode($unused_file) . '\', \'_blank\', edit_window_specs); return false;">' . I18N::translate('Create') . '</a> — ' . Filter::escapeHtml($media_tree) . '<p>';
}
}
$conf = I18N::translate('Are you sure you want to delete “%s”?', Filter::escapeJs($unused_file));
$delete_link = '<p><a onclick="if (confirm(\'' . Filter::escapeJs($conf) . '\')) jQuery.post(\'admin_media.php\',{delete:\'' . Filter::escapeJs($media_path . $unused_file) . '\',media_folder:\'' . Filter::escapeJs($media_folder) . '\'},function(){location.reload();})" href="#">' . I18N::Translate('Delete') . '</a></p>';
$data[] = array(mediaFileInfo($media_folder, $media_path, $unused_file) . $delete_link, $img, $create_form);
}
break;
default:
throw new \DomainException('Invalid action');
}
header('Content-type: application/json');
// See http://www.datatables.net/usage/server-side
echo json_encode(array('draw' => Filter::getInteger('draw'), 'recordsTotal' => $recordsTotal, 'recordsFiltered' => $recordsFiltered, 'data' => $data));
return;
}
/**
* A unique list of media folders, from all trees.
*
* @return string[]