当前位置: 首页>>代码示例>>PHP>>正文


PHP ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage函数代码示例

本文整理汇总了PHP中ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage函数的典型用法代码示例。如果您正苦于以下问题:PHP ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage函数的具体用法?PHP ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage怎么用?PHP ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: internationalize

 /**
  * @param $in
  *
  * @return mixed|void
  */
 function internationalize($in)
 {
     if (function_exists('langswitch_filter_langs_with_message')) {
         $in = langswitch_filter_langs_with_message($in);
     }
     if (function_exists('polyglot_filter')) {
         $in = polyglot_filter($in);
     }
     if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
         $in = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
     } elseif (function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
         $in = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
     } elseif (function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
         $in = qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($in);
     }
     return apply_filters('localization', $in);
 }
开发者ID:recetasdemama,项目名称:wordpress,代码行数:22,代码来源:aioseop_class.php

示例2: eme_translate

function eme_translate($value, $lang = '')
{
    //if (empty($lang))
    //   $lang=eme_detect_lang();
    if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage') && function_exists('qtrans_use')) {
        if (empty($lang)) {
            return qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($value);
        } else {
            return qtrans_use($lang, $value);
        }
    } elseif (function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage') && function_exists('ppqtrans_use')) {
        if (empty($lang)) {
            return ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($value);
        } else {
            return ppqtrans_use($lang, $value);
        }
    } elseif (function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage') && function_exists('qtranxf_use')) {
        if (empty($lang)) {
            return qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($value);
        } else {
            return qtranxf_use($lang, $value);
        }
    } elseif (function_exists('pll_translate_string') && function_exists('pll__')) {
        if (empty($lang)) {
            return pll__($value);
        } else {
            return pll_translate_string($value, $lang);
        }
    } else {
        return $value;
    }
}
开发者ID:johnmanlove,项目名称:Bridgeland,代码行数:32,代码来源:events-manager.php

示例3: putCreativeLayer


//.........这里部分代码省略.........
         $layer_selectable = RevSliderFunctions::getVal($layer, 'layer-selectable', 'default');
         $outputClass = 'tp-caption ' . trim($class);
         $outputClass = trim($outputClass) . ' ' . $internal_class . ' ';
         if ($layer_selectable !== "default") {
             if ($layer_selectable == 'on') {
                 $outputClass = trim($outputClass) . ' tp-layer-selectable ';
             }
         } else {
             if ($slider_selectable == 'on') {
                 $outputClass = trim($outputClass) . ' tp-layer-selectable ';
             }
         }
         //if($type == 'button') $outputClass .= ' ';
         //$speed = RevSliderFunctions::getVal($layer, "speed",300);
         $time = RevSliderFunctions::getVal($layer, 'time', 0);
         $easing = RevSliderFunctions::getVal($layer, 'easing', 'easeOutExpo');
         $randomRotate = RevSliderFunctions::getVal($layer, 'random_rotation', 'false');
         $randomRotate = RevSliderFunctions::boolToStr($randomRotate);
         $splitin = RevSliderFunctions::getVal($layer, 'split', 'none');
         $splitout = RevSliderFunctions::getVal($layer, 'endsplit', 'none');
         $elementdelay = intval(RevSliderFunctions::getVal($layer, 'splitdelay', 0));
         $endelementdelay = intval(RevSliderFunctions::getVal($layer, 'endsplitdelay', 0));
         $basealign = RevSliderFunctions::getVal($layer, 'basealign', 'grid');
         if ($elementdelay > 0) {
             $elementdelay /= 100;
         }
         if ($endelementdelay > 0) {
             $endelementdelay /= 100;
         }
         $text = RevSliderFunctions::getVal($layer, 'text');
         if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate
             $text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
         } elseif (function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate plus
             $text = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
         } elseif (function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate X
             $text = qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
         }
         $text_toggle = RevSliderFunctions::getVal($layer, 'texttoggle');
         if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate
             $text_toggle = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text_toggle);
         } elseif (function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate plus
             $text_toggle = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text_toggle);
         } elseif (function_exists('qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate X
             $text_toggle = qtranxf_useCurrentLanguageIfNotFoundUseDefaultLanguage($text_toggle);
         }
         $htmlVideoAutoplay = '';
         $htmlVideoAutoplayOnlyFirstTime = '';
         $htmlVideoNextSlide = '';
         $htmlVideoThumbnail = '';
         $htmlMute = '';
         $htmlCover = '';
         $htmlDotted = '';
         $htmlRatio = '';
         $htmlRewind = '';
         $htmlStartAt = '';
         $htmlEndAt = '';
         $htmlCoverPause = '';
         $htmlDisableOnMobile = '';
         $ids = RevSliderFunctions::getVal($layer, 'attrID');
         $classes = RevSliderFunctions::getVal($layer, 'attrClasses');
开发者ID:surreal8,项目名称:wptheme,代码行数:67,代码来源:output.class.php

示例4: tfuse_qtranslate

 function tfuse_qtranslate($text)
 {
     $text = html_entity_decode($text, ENT_QUOTES, 'UTF-8');
     if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
         $text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
     } elseif (function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
         $text = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
     } elseif (function_exists('icl_object_id') && strpos($text, 'wpml_translate') == true) {
         $text = do_shortcode($text);
     }
     return $text;
 }
开发者ID:pinchpointer,项目名称:ppsitewordpress,代码行数:12,代码来源:GENERAL.php

示例5: alo_em_ppqtrans_alo_em___

function alo_em_ppqtrans_alo_em___($text)
{
    if (function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
        $text = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
    }
    return $text;
}
开发者ID:dcotet,项目名称:alo-easymail,代码行数:7,代码来源:alo-easymail-multilingual.php

示例6: putCreativeLayer

 /**
  *
  * put creative layer
  */
 private function putCreativeLayer(RevSlide $slide, $static_slide = false)
 {
     $layers = $slide->getLayers();
     $customAnimations = RevOperations::getCustomAnimations('customin');
     //get all custom animations
     $customEndAnimations = RevOperations::getCustomAnimations('customout');
     //get all custom animations
     $startAnimations = RevOperations::getArrAnimations(false);
     //only get the standard animations
     $endAnimations = RevOperations::getArrEndAnimations(false);
     //only get the standard animations
     $lazyLoad = $this->slider->getParam("lazy_load", "off");
     $isTemplate = $this->slider->getParam("template", "false");
     if (empty($layers)) {
         return false;
     }
     $zIndex = 5;
     foreach ($layers as $layer) {
         $type = UniteFunctionsRev::getVal($layer, "type", "text");
         //set if video full screen
         $videoclass = '';
         $isFullWidthVideo = false;
         if ($type == "video") {
             $videoclass = ' tp-videolayer';
             $videoData = UniteFunctionsRev::getVal($layer, "video_data");
             if (!empty($videoData)) {
                 $videoData = (array) $videoData;
                 $isFullWidthVideo = UniteFunctionsRev::getVal($videoData, "fullwidth");
                 $isFullWidthVideo = UniteFunctionsRev::strToBool($isFullWidthVideo);
             } else {
                 $videoData = array();
             }
         }
         $class = UniteFunctionsRev::getVal($layer, "style");
         if (trim($class) !== '') {
             $this->class_include['.' . trim($class)] = true;
         }
         //add classname for style inclusion
         $animation = UniteFunctionsRev::getVal($layer, "animation", "tp-fade");
         if ($animation == "fade") {
             $animation = "tp-fade";
         }
         $customin = '';
         if (!array_key_exists($animation, $startAnimations) && array_key_exists($animation, $customAnimations)) {
             //if true, add custom animation
             $customin .= 'data-customin="';
             $animArr = RevOperations::getCustomAnimationByHandle($customAnimations[$animation]);
             if ($animArr !== false) {
                 $customin .= RevOperations::parseCustomAnimationByArray($animArr);
             }
             $customin .= '"';
             $animation = 'customin';
         }
         if (strpos($animation, 'customin-') !== false || strpos($animation, 'customout-') !== false) {
             $animation = "tp-fade";
         }
         //set output class:
         $layer_2d_rotation = intval(UniteFunctionsRev::getVal($layer, "2d_rotation", '0'));
         $layer_2d_origin_x = intval(UniteFunctionsRev::getVal($layer, "2d_origin_x", '50'));
         $layer_2d_origin_y = intval(UniteFunctionsRev::getVal($layer, "2d_origin_y", '50'));
         if ($layer_2d_rotation == 0) {
             $outputClass = "tp-caption " . trim($class);
         } else {
             $outputClass = "tp-caption ";
         }
         $outputClass = trim($outputClass) . " ";
         $outputClass .= trim($animation);
         $left = UniteFunctionsRev::getVal($layer, "left", 0);
         $top = UniteFunctionsRev::getVal($layer, "top", 0);
         $speed = UniteFunctionsRev::getVal($layer, "speed", 300);
         $time = UniteFunctionsRev::getVal($layer, "time", 0);
         $easing = UniteFunctionsRev::getVal($layer, "easing", "easeOutExpo");
         $randomRotate = UniteFunctionsRev::getVal($layer, "random_rotation", "false");
         $randomRotate = UniteFunctionsRev::boolToStr($randomRotate);
         $splitin = UniteFunctionsRev::getVal($layer, "split", "none");
         $splitout = UniteFunctionsRev::getVal($layer, "endsplit", "none");
         $elementdelay = intval(UniteFunctionsRev::getVal($layer, "splitdelay", 0));
         $endelementdelay = intval(UniteFunctionsRev::getVal($layer, "endsplitdelay", 0));
         if ($elementdelay > 0) {
             $elementdelay /= 100;
         }
         if ($endelementdelay > 0) {
             $endelementdelay /= 100;
         }
         $text = UniteFunctionsRev::getVal($layer, "text");
         if (function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate
             $text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
         } elseif (function_exists('ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {
             //use qTranslate plus
             $text = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);
         }
         $htmlVideoAutoplay = "";
         $htmlVideoAutoplayOnlyFirstTime = "";
         $htmlVideoNextSlide = "";
         $htmlVideoThumbnail = "";
//.........这里部分代码省略.........
开发者ID:RDePoppe,项目名称:luminaterealestate,代码行数:101,代码来源:revslider_output.class.php

示例7: ppqtrans_fixAdminBar

function ppqtrans_fixAdminBar($wp_admin_bar)
{
    global $wp_admin_bar;
    foreach ($wp_admin_bar->get_nodes() as $node) {
        $wp_admin_bar->add_node(ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($node));
    }
}
开发者ID:gregq,项目名称:qtranslate-xp,代码行数:7,代码来源:ppqtranslate_hooks.php

示例8: qs_service


//.........这里部分代码省略.........
        $translate_from_name = $q_config['language_name'][$translate_from];
    }
    if (!empty($translate_to)) {
        $translate_to_name = $q_config['language_name'][$translate_to];
    }
    if (!empty($translate_from) && !empty($translate_to)) {
        $title = sprintf('Translate "%1$s" from %2$s to %3$s', htmlspecialchars($post_title), $translate_from_name, $translate_to_name);
    } elseif (!empty($translate_from)) {
        $title = sprintf('Translate "%1$s" from %2$s', htmlspecialchars($post_title), $translate_from_name);
    } else {
        $title = sprintf('Translate "%1$s"', htmlspecialchars($post_title));
    }
    // Check data
    if (isset($_POST['service_id'])) {
        $service_id = intval($_POST['service_id']);
        $default_service = $service_id;
        update_option('qs_default_service', $service_id);
        $order_key = substr(md5(time() . AUTH_KEY), 0, 20);
        $request = array('order_service_id' => $service_id, 'order_url' => get_option('home'), 'order_key' => $order_key, 'order_title' => $post_title, 'order_text' => $post_content, 'order_excerpt' => $post_excerpt, 'order_source_language' => $translate_from, 'order_source_locale' => $q_config['locale'][$translate_from], 'order_target_language' => $translate_to, 'order_target_locale' => $q_config['locale'][$translate_to]);
        // check for additional fields
        if (isset($service_settings[$service_id]) && is_array($service_settings[$service_id])) {
            $request['order_required_field'] = array();
            foreach ($service_settings[$service_id] as $setting => $value) {
                $request['order_required_field'][$setting] = $value;
            }
        }
        if (isset($_POST['token'])) {
            $request['order_token'] = $_POST['token'];
        }
        $answer = qs_queryQS(QS_INIT_TRANSLATION, $request);
        if (isset($answer['error'])) {
            $error = sprintf(__('An error occured: %s', 'qtranslate'), $qs_error_messages[$answer['error']]);
            if ($answer['message'] != '') {
                $error .= '<br />' . sprintf(__('Additional information: %s', 'qtranslate'), ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($answer['message']));
            }
        }
        if (isset($answer['order_id'])) {
            $orders = get_option('qs_orders');
            if (!is_array($orders)) {
                $orders = array();
            }
            $orders[] = array('post_id' => $post_id, 'service_id' => $service_id, 'source_language' => $translate_from, 'target_language' => $translate_to, 'order' => array('order_key' => $order_key, 'order_id' => $answer['order_id']));
            update_option('qs_orders', $orders);
            if (empty($answer['message'])) {
                $order_completed_message = '';
            } else {
                $order_completed_message = htmlspecialchars($answer['message']);
            }
            qs_UpdateOrder($answer['order_id']);
        }
    }
    if (isset($error)) {
        ?>
<div class="wrap">
<h2><?php 
        _e('qTranslate Services', 'qtranslate');
        ?>
</h2>
<div id="message" class="error fade"><p><?php 
        echo $error;
        ?>
</p></div>
<p><?php 
        printf(__('An serious error occured and qTranslate Services cannot proceed. For help, please visit the <a href="%s">Support Forum</a>', 'qtranslate'), 'http://www.qianqin.de/qtranslate/forum/');
        ?>
</p>
开发者ID:gregq,项目名称:qtranslate-xp,代码行数:67,代码来源:ppqtranslate_services.php

示例9: qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage

 function qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($content)
 {
     return ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($content);
 }
开发者ID:Tusko,项目名称:acf-qtranslate,代码行数:4,代码来源:ppqtranslate.php

示例10: ppqtrans_convertFormat

function ppqtrans_convertFormat($format, $default_format)
{
    global $q_config;
    // check for multilang formats
    $format = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($format);
    $default_format = ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($default_format);
    switch ($q_config['use_strftime']) {
        case QT_DATE:
            if ($format == '') {
                $format = $default_format;
            }
            return ppqtrans_convertDateFormatToStrftimeFormat($format);
        case QT_DATE_OVERRIDE:
            return ppqtrans_convertDateFormatToStrftimeFormat($default_format);
        case QT_STRFTIME:
            return $format;
        case QT_STRFTIME_OVERRIDE:
            return $default_format;
    }
}
开发者ID:gregq,项目名称:qtranslate-xp,代码行数:20,代码来源:ppqtranslate_utils.php


注:本文中的ppqtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。