當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TranslationManagement::icanlocalize_translators_list方法代碼示例

本文整理匯總了PHP中TranslationManagement::icanlocalize_translators_list方法的典型用法代碼示例。如果您正苦於以下問題:PHP TranslationManagement::icanlocalize_translators_list方法的具體用法?PHP TranslationManagement::icanlocalize_translators_list怎麽用?PHP TranslationManagement::icanlocalize_translators_list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TranslationManagement的用法示例。


在下文中一共展示了TranslationManagement::icanlocalize_translators_list方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _e

// shows only when translation polling is on and there are translations in progress
$ICL_Pro_Translation->get_icl_manually_tranlations_box('icl_cyan_box');
?>
        <?php 
if (count($active_languages = $sitepress->get_active_languages()) > 1) {
    ?>
            <div><a href="javascript:void(0)" onclick="jQuery(this).parent().next('.wrapper').slideToggle();" 
                style="display:block; padding:5px; border: 1px solid #eee; margin-bottom:2px; background-color: #F7F7F7;"><?php 
    _e('Content translation', 'wpml-translation-management');
    ?>
</a>
            </div>
            <div class="wrapper" style="display:none; padding: 5px 10px; border: 1px solid #eee; border-top: 0px; margin:-11px 0 2px 0;">
            <?php 
    $your_translators = TranslationManagement::get_blog_translators();
    $other_service_translators = TranslationManagement::icanlocalize_translators_list();
    if (!empty($your_translators) || !empty($other_service_translators)) {
        echo '<p><strong>' . __('Your translators', 'wpml-translation-management') . '</strong></p><ul>';
        if (!empty($your_translators)) {
            foreach ($your_translators as $your_translator) {
                echo '<li>';
                if ($current_user->ID == $your_translator->ID) {
                    $edit_link = 'profile.php';
                } else {
                    $edit_link = esc_url(add_query_arg('wp_http_referer', urlencode(esc_url(stripslashes($_SERVER['REQUEST_URI']))), "user-edit.php?user_id={$your_translator->ID}"));
                }
                echo '<a href="' . $edit_link . '"><strong>' . $your_translator->display_name . '</strong></a> - ';
                foreach ($your_translator->language_pairs as $from => $lp) {
                    $tos = array();
                    foreach ($lp as $to => $null) {
                        $tos[] = $active_languages[$to]['display_name'];
開發者ID:ViktorLinnasaar,項目名稱:hanset,代碼行數:31,代碼來源:_icl_dashboard_widget.php


注:本文中的TranslationManagement::icanlocalize_translators_list方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。