本文整理汇总了PHP中SitePress::get_display_language_name方法的典型用法代码示例。如果您正苦于以下问题:PHP SitePress::get_display_language_name方法的具体用法?PHP SitePress::get_display_language_name怎么用?PHP SitePress::get_display_language_name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SitePress
的用法示例。
在下文中一共展示了SitePress::get_display_language_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sprintf
function translation_queue_after_display()
{
$export_label = esc_html__('Export all jobs:', 'wpml-translation-management');
if (isset($_SESSION['translation_ujobs_filter'])) {
if (!empty($_SESSION['translation_ujobs_filter']['type'])) {
$post_slug = preg_replace('/^post_/', '', $_SESSION['translation_ujobs_filter']['type'], 1);
$post_type = get_post_type_object($post_slug);
$type = $post_type->label;
} else {
$type = __('All types', 'wpml-translation-management');
}
$from = !empty($_SESSION['translation_ujobs_filter']['from']) ? $this->sitepress->get_display_language_name($_SESSION['translation_ujobs_filter']['from']) : __('Any language', 'wpml-translation-management');
$to = !empty($_SESSION['translation_ujobs_filter']['to']) ? $this->sitepress->get_display_language_name($_SESSION['translation_ujobs_filter']['to']) : __('Any language', 'wpml-translation-management');
$status = !empty($_SESSION['translation_ujobs_filter']['status']) && (int) $_SESSION['translation_ujobs_filter']['status'] !== ICL_TM_WAITING_FOR_TRANSLATOR ? TranslationManagement::status2text($_SESSION['translation_ujobs_filter']['status']) : (!empty($_SESSION['translation_ujobs_filter']['status']) ? __('Available to translate', 'wpml-translation-management') : 'All statuses');
$export_label = sprintf(esc_html__('Export all filtered jobs of %1$s from %2$s to %3$s in %4$s:', 'wpml-translation-management'), '<b>' . $type . '</b>', '<b>' . $from . '</b>', '<b>' . $to . '</b>', '<b>' . $status . '</b>');
}
?>
<br />
<table class="widefat">
<thead><tr><th><?php
esc_html_e('Import / Export XLIFF', 'wpml-translation-management');
?>
</th></tr></thead>
<tbody><tr><td>
<form method="post" id="translation-xliff-export-all-filtered" action="">
<label for="wpml_xliff_export_all_filtered"><?php
echo $export_label;
?>
</label>
<select name="xliff_version" class="select"><?php
echo $this->get_xliff_version_select_options();
?>
</select>
<input type="submit" value="<?php
esc_attr_e('Export', 'wpml-translation-management');
?>
" name="wpml_xliff_export_all_filtered" id="xliff_download" class="button-secondary action" />
<input type="hidden" value="<?php
echo wp_create_nonce('xliff-export-all-filtered');
?>
" name="nonce">
</form>
<hr>
<form enctype="multipart/form-data" method="post" id="translation-xliff-upload" action="">
<label for="upload-xliff-file"><?php
_e('Select the xliff file or zip file to upload from your computer: ', 'wpml-translation-management');
?>
</label>
<input type="file" id="upload-xliff-file" name="import" /><input type="submit" value="<?php
_e('Upload', 'wpml-translation-management');
?>
" name="xliff_upload" id="xliff_upload" class="button-secondary action" />
</form>
</td></tr></tbody>
</table>
<?php
}