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


PHP get_translation函数代码示例

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


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

示例1: process

function process($like_object, $additional, $fbuid, $domain = NULL)
{
    global $conf;
    $domain = 'fxp.co.il -site:fxp.co.il/archive';
    //$domain = 'fxp.co.il/archive';
    //$domain = NULL;
    save_like($like_object, $additional, $fbuid);
    $translation = get_translation($like_object['id'], $like_object['name']);
    $query = '"' . $translation . '"';
    if ($translation == '') {
        $query = '"' . $like_object['name'] . '"';
    }
    if ($domain != NULL) {
        $query .= " site:" . $domain;
    }
    //get bing data
    $results = getBingData($query);
    //Add category data
    if (is_array($results)) {
        foreach ($results as $entry) {
            if (is_null($entry)) {
                continue;
            }
            //			var_dump($entry);
            $item = get_object_vars($entry);
            $item['url'] = $entry->Url;
            $res[] = $item;
        }
    } else {
        $res[] = 'empty';
    }
    save_bing($like_object['id'], $res, $domain);
    return $res;
}
开发者ID:roieki,项目名称:CE_Core,代码行数:34,代码来源:controller.php

示例2: ach_translate_cc

function ach_translate_cc($cc = 'c_neutral')
{
    global $_USER;
    $t = array();
    $t['c_matis'] = 'Matis';
    $t['c_tryker'] = 'Tryker';
    $t['c_fyros'] = 'Fyros';
    $t['c_zorai'] = 'Zorai';
    $t['c_kami'] = 'Kami';
    $t['c_karavan'] = 'Karavan';
    $t['c_neutral'] = get_translation('ach_c_neutral', $_USER->getLang());
    return $t[$cc];
}
开发者ID:cls1991,项目名称:ryzomcore,代码行数:13,代码来源:ach_render_common.php

示例3: AchMenu

 function AchMenu($open = false)
 {
     global $DBc, $_USER;
     parent::__construct();
     $this->open = $open;
     // the summary page is autogenerated and has no database entry. We add it manually here.
     $tmp = array();
     $tmp['ac_id'] = 0;
     $tmp['ac_parent'] = null;
     $tmp['acl_name'] = get_translation('ach_summary', $_USER->getLang());
     $tmp['ac_image'] = "summary.png";
     $tmp['ac_order'] = -1;
     $tmp['open'] = $open;
     $this->addChild(new AchMenuNode($tmp, $this));
     $res = $DBc->sqlQuery("SELECT * FROM ach_category LEFT JOIN (ach_category_lang) ON (acl_lang='" . $_USER->getLang() . "' AND acl_category=ac_id) WHERE ac_parent IS NULL ORDER by ac_order ASC, acl_name ASC");
     $sz = sizeof($res);
     for ($i = 0; $i < $sz; $i++) {
         $res[$i]['open'] = $open;
         $this->addChild($this->makeChild($res[$i]));
     }
 }
开发者ID:cls1991,项目名称:ryzomcore,代码行数:21,代码来源:AchMenu_class.php

示例4: va_time

$current_date = va_time();
$cc_start_years = get_db_values("SELECT start_year AS year_value, start_year AS year_description FROM " . $table_prefix . "cc_start_years", array(array("", YEAR_MSG)));
if (sizeof($cc_start_years) < 2) {
    $cc_start_years = array(array("", YEAR_MSG));
    for ($y = 7; $y >= 0; $y--) {
        $cc_start_years[] = array($current_date[YEAR] - $y, $current_date[YEAR] - $y);
    }
}
$cc_expiry_years = get_db_values("SELECT expiry_year AS year_value, expiry_year AS year_description FROM " . $table_prefix . "cc_expiry_years", array(array("", YEAR_MSG)));
if (sizeof($cc_expiry_years) < 2) {
    $cc_expiry_years = array(array("", YEAR_MSG));
    for ($y = 0; $y <= 7; $y++) {
        $cc_expiry_years[] = array($current_date[YEAR] + $y, $current_date[YEAR] + $y);
    }
}
set_options($cc_start_years, $cc_start_year, "cc_start_year");
set_options($cc_expiry_years, $cc_expiry_year, "cc_expiry_year");
$cc_months = array_merge(array(array("", MONTH_MSG)), $months);
set_options($cc_months, $cc_start_month, "cc_start_month");
set_options($cc_months, $cc_expiry_month, "cc_expiry_month");
$r->set_parameters();
$intro_text = trim($cc_info["intro_text"]);
$intro_text = get_translation($intro_text);
$intro_text = get_currency_message($intro_text, $currency);
if ($intro_text) {
    $t->set_var("intro_text", $intro_text);
    $t->parse("intro_block", false);
}
$t->set_var("billing_address", "test");
$block_parsed = true;
$t->parse("block_body", false);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_order_payment_form.php

示例5: get_translation

$r->set_value("delivery_company_id", get_translation(get_db_value("SELECT company_name FROM " . $table_prefix . "companies WHERE company_id=" . $db->tosql($r->get_value("delivery_company_id"), INTEGER, true, false))));
$r->set_value("delivery_state_id", get_translation(get_db_value("SELECT state_name FROM " . $table_prefix . "states WHERE state_id=" . $db->tosql($r->get_value("delivery_state_id"), INTEGER))));
$r->set_value("delivery_country_id", get_translation(get_db_value("SELECT country_name FROM " . $table_prefix . "countries WHERE country_id=" . $db->tosql($r->get_value("delivery_country_id"), INTEGER))));
$r->set_value("cc_type", get_db_value("SELECT credit_card_name FROM " . $table_prefix . "credit_cards WHERE credit_card_id=" . $db->tosql($r->get_value("cc_type"), INTEGER)));
$r->set_parameters();
if ($personal_number > 0 || $personal_properties) {
    $t->parse("personal", false);
}
if ($delivery_number > 0 || $delivery_properties) {
    $t->parse("delivery", false);
}
if (trim($payment_info)) {
    $payment_number++;
    $t->set_block("payment_info", $payment_info);
    $t->parse("payment_info", false);
    $t->global_parse("payment_info_block", false, false, true);
} else {
    $t->set_var("payment_info_block", "");
}
if ($payment_number > 0 || $payment_properties) {
    $t->sparse("payment", false);
}
$intro_text = get_setting_value($order_confirmation, "intro_text", "");
$intro_text = get_translation(trim($intro_text));
$intro_text = get_currency_message($intro_text, $currency);
if ($intro_text) {
    $t->set_var("intro_text", $intro_text);
    $t->parse("intro_block", false);
}
$block_parsed = true;
$t->parse("block_body", false);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_order_data_preview.php

示例6: ach_render_summary_footer

function ach_render_summary_footer(&$summary)
{
    global $_USER;
    $nodes = $summary->getSummary();
    $html = "";
    $sum_done = 0;
    $sum_total = 0;
    $i = 0;
    foreach ($nodes as $elem) {
        if ($i % 3 == 0) {
            $html .= "<tr>";
        }
        $html .= "<td width='50%' align='center'>" . $elem[0] . "<br>";
        if ($elem[3] == 0) {
            $html .= ach_render_progressbar($elem[1], $elem[2], 200);
        } else {
            $html .= ach_render_progressbar($elem[1], false, 200);
        }
        $html .= "</td>";
        $sum_done += $elem[1];
        $sum_total += $elem[2];
        if ($i % 3 == 2) {
            $html .= "</tr>";
        }
        $i++;
    }
    if ($i % 3 == 2) {
        $html .= "</tr>";
    }
    $html = "<p />\n\t\t<div style='display:block;font-weight:bold;font-size:30px;color:#FFFFFF;text-align:center;margin-bottom:10px;'>" . get_translation('ach_summary_stats', $_USER->getLang()) . "</div>\n\t\t<table>\n\t\t\t<tr>\n\t\t\t\t<td colspan='3' align='center'>" . get_translation('ach_summary_stats_total', $_USER->getLang()) . "<br>" . ach_render_progressbar($sum_done, $sum_total, 450) . "<br></td>\n\t\t\t</tr>\n\t\t\t" . $html . "\n\t\t</table>";
    return $html;
}
开发者ID:cls1991,项目名称:ryzomcore,代码行数:32,代码来源:ach_render_web.php

示例7: get_setting_value

    if (isset($auto_meta_title) && strlen($auto_meta_title)) {
        $meta_title = $auto_meta_title;
    } else {
        $meta_title = get_setting_value($settings, "site_name");
    }
}
if (!strlen($meta_description) && isset($auto_meta_description)) {
    $meta_description = $auto_meta_description;
}
// set some meta data
$t->set_var("meta_title", get_translation($meta_title));
if ($meta_keywords) {
    set_head_tag("meta", array("name" => "keywords", "content" => get_translation($meta_keywords)), "name", 1);
}
if ($meta_description) {
    set_head_tag("meta", array("name" => "description", "content" => get_translation(get_meta_desc($meta_description))), "name", 1);
}
if (!isset($canonical_url) || !strlen($canonical_url)) {
    $canonical_url = "";
}
set_link_tag(htmlspecialchars($canonical_url), "canonical", "");
if ($google_analytics && $google_tracking_code) {
    $t->parse_to("head_tag", "head_tags");
}
//Customization by Vital - Open Graph tags
if (!isset($meta_OG_image) || !strlen($meta_OG_image)) {
    $meta_OG_image = "http://www.cuttingedgestencils.com/images/small/Casablanca-stencil-design.jpg";
}
$meta_OG_image = strpos($meta_OG_image, "cuttingedgestencils.com") ? $meta_OG_image : "http://www.cuttingedgestencils.com/" . $meta_OG_image;
set_head_tag("meta", array("property" => "og:type", "content" => "website"), "property", 1);
set_head_tag("meta", array("property" => "og:image", "content" => $meta_OG_image), "property", 1);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:page_layout.php

示例8: show_site_map_tree

function show_site_map_tree($item, $key, $parent_key = -1, $type = '')
{
    global $t, $settings, $site_map_tree;
    global $records_per_page, $first_record_on_page, $last_record_on_page, $current_record;
    $current_record++;
    if ($records_per_page && $current_record > $last_record_on_page) {
        return;
    }
    if ($parent_key < 0) {
        $type = $key;
    }
    if (!is_array($item)) {
        $key = $item;
        $item = $site_map_tree[$key];
    }
    $current_item_record = $current_record;
    if (isset($item[SITEMAP_SUBS_INDEX])) {
        foreach ($item[SITEMAP_SUBS_INDEX] as $sub_item_key) {
            show_site_map_tree($type ? $site_map_tree[$type][$sub_item_key] : $site_map_tree[$sub_item_key], $sub_item_key, $key, $type);
        }
    }
    if (!$records_per_page || $current_item_record > $first_record_on_page && $current_item_record <= $last_record_on_page) {
        $t->set_var("item_url", $settings["site_url"] . $item[SITEMAP_URL_INDEX]);
        $t->set_var("item_name", get_translation($item[SITEMAP_TITLE_INDEX]));
        $show_item = true;
    } else {
        $t->set_var("item_url", "");
        $t->set_var("item_name", "");
        $show_item = false;
    }
    $subitems = $t->get_var("subitems_" . $key);
    if ($subitems) {
        $t->set_var("subitems", "<ul>" . $subitems . "</ul>");
    } else {
        $t->set_var("subitems", "");
    }
    if ($subitems || $show_item) {
        if ($parent_key >= 0) {
            $t->parse_to("item", "subitems_" . $parent_key);
        } else {
            $t->parse("item");
        }
    }
}
开发者ID:nisargadesign,项目名称:CES,代码行数:44,代码来源:block_site_map.php

示例9: bloginfo

bloginfo('activity_license_url');
?>
/"><?php 
echo $activity_license_name;
?>
</a></li>
        </ul>
    </div>
    <!-- END .subMenu_box -->
    <div class="contentLeft">
        <span class="blue18Ins"><?php 
the_title();
?>
</span>
        <span class="formBlack12"><?php 
echo get_translation('activity_geography_move_over_flag');
?>
:</span>
        <div class="bMap">
            <div class="f1">
                <img class="flagImg" alt="" border="0" src="<?php 
bloginfo('stylesheet_directory');
?>
/images/big_flag_blue.png" width="45" height="42" onclick="showPostByFlag( 1 );"/>
            </div>
            <!--<div class="f2">
                <img class="flagImg" alt="" border="0" src="<?php 
/*bloginfo( 'stylesheet_directory' ); */
?>
/images/big_flag_red.png" width="45" height="42" onclick="showPostByFlag( 2 );"/>
            </div>-->
开发者ID:popovdenis,项目名称:kmst,代码行数:31,代码来源:activity-geography.php

示例10: get_translation

 $description = "";
 if ($desc_type == 2) {
     $description = get_translation($db->f("full_description"));
     //----ADDED SHORT DESCRIPTION TO TEMPLATE
     $description2 = get_translation($db->f("short_description"));
 } elseif ($desc_type == 1) {
     $description = get_translation($db->f("short_description"));
 }
 $image = "";
 $image_alt = "";
 if ($desc_image == 3) {
     $image = $db->f("image_large");
     $image_alt = get_translation($db->f("image_large_alt"));
 } elseif ($desc_image == 2) {
     $image = $db->f("image");
     $image_alt = get_translation($db->f("image_alt"));
 }
 if (!strlen($image)) {
     $image_exists = false;
 } elseif (!image_exists($image)) {
     $image_exists = false;
 } else {
     $image_exists = true;
 }
 if (strlen($description) || $image_exists) {
     $html_template = get_setting_value($block, "html_template", "block_category_description.html");
     $t->set_file("block_body", $html_template);
     if ($image_exists) {
         if (preg_match("/^http\\:\\/\\//", $image)) {
             $image_size = "";
         } else {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_category_description.php

示例11: write_to

 if ($dbd->next_record()) {
     if ($dbd->f("category_name")) {
         $specific_item_type = $dbd->f("category_name");
     }
 }
 //END customization
 write_to("\t\t<" . $schema_type . ":product_type>" . htmlspecialchars($item_google_type) . " &gt; " . $specific_item_type . "</" . $schema_type . ":product_type>" . $eol);
 write_to("\t\t<" . $schema_type . ":google_product_category>" . htmlspecialchars($item_google_type) . "</" . $schema_type . ":google_product_category>" . $eol);
 write_to("\t\t<" . $schema_type . ":expiration_date>" . $expiration_date_formatted . "</" . $schema_type . ":expiration_date>" . $eol);
 write_to("\t\t<" . $schema_type . ":condition>" . $google_base_product_condition . "</" . $schema_type . ":condition>" . $eol);
 $description = trim(strip_tags(get_translation($db->f("full_description"))));
 if (!strlen($description)) {
     $description = trim(strip_tags(get_translation($db->f("short_description"))));
 }
 if (!strlen($description)) {
     $description = trim(strip_tags(get_translation($db->f("features"))));
 }
 if (!strlen($description)) {
     $description = $item_name;
 }
 write_to("\t\t<description><![CDATA[" . charset_conv($description) . "]]></description>" . $eol);
 if (preg_match('/.*apparel.*/i', $item_google_type) && !strlen($manufacturer_name) && $google_base_country != 0) {
     $warning[$item_id]['brand'] = APPAREL_BRAND_WARN_GB . $eol;
 }
 if (strlen($manufacturer_name)) {
     write_to("\t\t<" . $schema_type . ":brand><![CDATA[" . charset_conv($manufacturer_name) . "]]></" . $schema_type . ":brand>" . $eol);
 }
 if (preg_match('/.*apparel.*/i', $item_google_type) == 0 && (!strlen($manufacturer_code) && !strlen($item_code) || !strlen($manufacturer_code) && !strlen($manufacturer_name) || !strlen($item_code) && !strlen($manufacturer_name)) && ($google_base_country != 0 || $google_base_country != 3) && preg_match('/.*books.*/i', $item_google_type) == 0) {
     $warning[$item_id]['codes'] = CODE_WARN_GB . $eol;
 } else {
     if (preg_match('/.*books.*/i', $item_google_type) && !strlen($item_code) && $google_base_country != 0) {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:admin_export_google_base.php

示例12: va_date

     $t->set_var("article_date_block", "");
 }
 if (strpos($details_fields, ",date_end,")) {
     $date_end = $db->f("date_end", DATETIME);
     $date_end_string = va_date($datetime_show_format, $date_end);
     $t->set_var("date_end", $date_end_string);
     $t->global_parse("date_end_block", false, false, true);
 } else {
     $t->set_var("date_end_block", "");
 }
 if (strlen($article_date_string) || strlen($date_end_string)) {
     $t->global_parse("date_block", false, false, true);
 }
 for ($i = 0; $i < sizeof($article_fields); $i++) {
     $field_name = $article_fields[$i];
     $fields[$field_name] = get_currency_message(get_translation($db->f($field_name)), $currency);
     if (strlen($fields[$field_name]) && strpos($details_fields, "," . $field_name . ",")) {
         $t->set_var($field_name, $fields[$field_name]);
         $t->global_parse($field_name . "_block", false, false, true);
     } else {
         $fields[$field_name] = "";
         $t->set_var($field_name, "");
         $t->set_var($field_name . "_block", "");
     }
 }
 if (strlen($fields["author_name"]) || strlen($fields["author_email"]) || strlen($fields["author_url"])) {
     $t->global_parse("author_block", false, false, true);
 } else {
     $t->set_var("author_block", false);
 }
 if (strpos($details_fields, ",full_description,")) {
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_articles_details.php

示例13: get_translation

        $meta_description = get_translation($db->f("meta_description"));
        $meta_keywords = get_translation($db->f("meta_keywords"));
        $is_html = $db->f("is_html");
        $custom_page_id = $db->f("page_id");
        $page_type = $db->f("page_type");
        $page_url = $db->f("page_url");
        $page_path = $db->f("page_path");
        if (strlen($page_url)) {
            header("HTTP/1.0 302 OK");
            header("Status: 302 OK");
            header("Location: " . $page_url);
            exit;
        }
        $page_title = get_translation($db->f("page_title"));
        $page_title = get_currency_message($page_title, $currency);
        $page_body = get_translation($db->f("page_body"));
        $page_body = strlen($page_path) ? @join("", file($page_path)) : $page_body;
        $page_body = get_currency_message($page_body, $currency);
        if (get_setting_value($settings, "php_in_custom_pages", 0)) {
            eval_php_code($page_body);
        }
        $page_body = $is_html ? $page_body : "<div align=\"justify\">" . nl2br(htmlspecialchars($page_body)) . "</div>";
    } else {
        //$page_title = "Page Error";
        //$page_body = "<div align=\"center\"><font color=\"red\"><b>Page '" . htmlspecialchars($custom_page_code) . "' was not found</b></font></div>";
        header("Location: index.php");
        exit;
    }
} else {
    header("Location: index.php");
    exit;
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:page.php

示例14: function

                    <input maxlength="22" class="searchF" name="s" id="s" type="text" value=""/>
                </form>
                <script type="text/javascript">
                    $(document).ready( function(){
                        $( '.searchF' ).DefaultValue( '<?php 
echo get_translation('header_search_input');
?>
' );
                    });
                </script>
            </div>
            <!-- END .head_kont -->
            <div class="head_stand">
                <div class="otstup_1">
                    <span class="grey12_txt"><?php 
echo get_translation('header_quality_standarts_label');
?>
:</span>
                </div>
                <!-- END .otstup_1 -->
                <div class="otstup_2">
                    <a href="#" class="grey14d_lin">ИСО 9001:2009</a><br/>
                    <a href="#" class="grey14d_lin">ИСО 14001:2006</a>
                </div>
                <!-- END .otstup_2 -->
                <div class="pic_home">
                    <a href="<?php 
echo get_bloginfo('wpurl');
?>
/<?php 
echo $lang;
开发者ID:popovdenis,项目名称:kmst,代码行数:31,代码来源:header.php

示例15: md5

 $order_currency["separator"] = $db->f("thousands_separator");
 $vc = md5($order_id . $placed_date[3] . $placed_date[4] . $placed_date[5]);
 if ($orders_currency != 1) {
     $order_currency["left"] = $currency["left"];
     $order_currency["right"] = $currency["right"];
     $order_currency["decimals"] = $currency["decimals"];
     $order_currency["point"] = $currency["point"];
     $order_currency["separator"] = $currency["separator"];
     if (strtolower($currency["code"]) != strtolower($order_currency_code)) {
         $order_currency["rate"] = $currency["rate"];
     }
 }
 $t->set_var("order_id", $order_id);
 $t->set_var("vc", $vc);
 $t->set_var("order_placed_date", va_date($datetime_show_format, $placed_date));
 $t->set_var("order_status", get_translation($db->f("status_name")));
 $tracking_number = $db->f("shipping_tracking_id");
 if (strlen($tracking_number) > 3 && strpos($db->f("shipping_type_desc"), "USPS") !== false) {
     $tracking = '<a class="tracking" href="https://tools.usps.com/go/TrackConfirmAction.action?tLabels=' . $tracking_number . '" target="_blank">' . $tracking_number . '</a>';
 } else {
     $tracking = $tracking_number;
 }
 $t->set_var("tracking", $tracking);
 $t->set_var("order_total", currency_format($order_total, $order_currency));
 if ($is_placed || $paid_status) {
     $t->set_var("pay_link", "");
 } else {
     $t->sparse("pay_link", false);
 }
 if ($user_invoice_activation) {
     $t->sparse("invoice_links", false);
开发者ID:nisargadesign,项目名称:CES,代码行数:31,代码来源:block_user_orders.php


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