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


PHP translate_text函数代码示例

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


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

示例1: addSearch

 function addSearch($name, $field, $type, $value = '', $default = "")
 {
     $str = '';
     $value = $value ? $value : $default;
     $str .= ' ' . $name . ' ';
     switch ($type) {
         case "array":
             $str .= '<select name="' . $field . '" id="' . $field . '" class="textbox form-control">';
             foreach ($value as $id => $text) {
                 $str .= '<option value="' . $id . '" ' . ($default == $id ? 'selected' : '') . '>' . $text . '</option>';
             }
             $str .= '</select>';
             break;
         case "date":
             $value = $value ? $value : ($default ? $default : date('d/m/Y'));
             $value = getValue($field, "str", "GET", $value);
             $str .= '<input type="text" name="' . $field . '" id="' . $field . '" value="' . $value . '" datepick-element="1" class="form-control">';
             break;
         case "text":
             $value = getValue($field, "str", "GET", translate_text("Enter keyword"));
             $str .= '<input type="text" class="form-control" name="' . $field . '" id="' . $field . '" value="' . $value . '">';
             break;
     }
     $this->arrayAddSearch[] = $str;
 }
开发者ID:virutmath,项目名称:suckhoe,代码行数:25,代码来源:grid.php

示例2: text_translate

function text_translate($text, $from = 'en', $to = 'en')
{
    include_once dirname(__FILE__) . '/modules/realtimetranslate/translate.php';
    return translate_text($text, $from, $to);
}
开发者ID:rezarahimi4861,项目名称:icmf,代码行数:5,代码来源:cometchat_shared.php

示例3: require_once

$fs_filepath		= "../../../pictures/category/";
$extension_list 	= "jpg,gif,png,swf";
$limit_size			= 300000;
#+
$small_width		= 	125;
$small_heght		=	97;
$small_quantity		=	100;
#+
$medium_width		= 	250;
$medium_heght		=	100;
$medium_quantity	=	90;


//check security...
require_once("../../resource/security/security.php");
//Check user login...
checkLogged();
//Check access module...
if(checkAccessModule($module_id) != 1) redirect($fs_denypath);


$array_config		= array("image"=>1,"upper"=>1,"order"=>1,"description"=>1);	
	
$array_value =	array("static" => translate_text("Trang tĩnh"),
                  	"nguoimua" => translate_text("Dành cho người mua"),
							"nguoiban" => translate_text("Dành cho người bán"),
                  	"quydinh" => translate_text("Quy định"),
							"thongbao" => translate_text("Thông báo")
                  	);			
?>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:30,代码来源:inc_security.php

示例4: footer

	function footer($total_list = 0){
		$str = '<table cellpadding="5" cellspacing="0" width="100%" class="page"><tr>';
		if($this->delete){
			$str .= '<td width="150">';
			$str .= '	<a href="#" onclick="if (confirm(\''  . str_replace("'","\'",translate_text("Do you want to delete the product you've selected ?"))  . '\')){ deleteall(' . $total_list . '); }">' . translate_text("Delete all selected") . '</a>';
			$str .= '	<img src="' . $this->image_path . 'delete.gif" border="0" align="absmiddle" />';
			$str .= '</td>';	
		}
		$str .= '<td width="150">' . translate_text("Total record") . ' : <span id="total_footer">' . $this->total_record . '</span></td>';
		$str .= '<td>' . $this->generate_page() . '</td>';
		$str .= '</tr></table>';
		return $str;
	}
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:13,代码来源:grid.php

示例5: require_once

<?
require_once("inc_security.php");
//check quyền them sua xoa
checkAddEdit("delete");
$fs_redirect	= base64_decode(getValue("url","str","GET",base64_encode("listing.php")));
$record_id		= getValue("record_id","int","GET");
$field_id		= "cat_id";
//kiểm tra quyền sửa xóa của user xem có được quyền ko
checkRowUser($fs_table,$field_id,$record_id,$fs_redirect);
//Delete data with ID
delete_file($fs_table,$field_id,$record_id,"cat_picture",$fs_filepath);
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
echo '<script language="javascript">alert("' . translate_text("You have successfully deleted") . '!");</script>';

redirect($fs_redirect);

?>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:17,代码来源:delete_pic.php

示例6: menu

$class_menu			= new menu();
$listAll				= $class_menu->getAllChild("categories_multi", "cat_id", "cat_parent_id", 0, "cat_type='static' AND lang_id = " . $lang_id, "cat_id,cat_name,cat_type", "cat_order ASC,cat_name ASC", "cat_has_child", 0);
unset($class_menu);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<?php 
echo $load_header;
?>
</head>
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<? /*------------------------------------------------------------------------------------------------*/ ?>
<?php 
echo template_top(translate_text("Records Add"));
?>
<? /*------------------------------------------------------------------------------------------------*/ ?>
<?
$form = new form();
$form->create_form("form_name",$fs_action,"post","multipart/form-data",'onsubmit="validateForm();return false;"  id="form_name" ');
$form->create_table();
?>
<?php 
echo $form->text_note('Những ô dấu sao (<font class="form_asterisk">*</font>) là bắt buộc phải nhập.');
echo $form->errorMsg($errorMsg);
?>

<?php 
echo $form->select_db_multi("Danh mục", "sta_category_id", "sta_category_id", $listAll, "cat_id", "cat_name", $sta_category_id, "Danh mục", 1, "", 1, 0, "", "");
echo $form->text("Tiêu đề", "sta_title", "sta_title", $sta_title, "Tiêu đề", 1, 250, "", 255, "", "", "");
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:31,代码来源:edit.php

示例7: translate_text

echo translate_text("Account");
?>
 :</td>
						<td><input type="text" name="username" id="username" /></td>
					</tr>
					<tr>
						<td><?php 
echo translate_text("Password");
?>
 :</td>
						<td><input type="password" name="password" id="password" /></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td><input type="submit" class="tootlipObserved" value="<?php 
echo translate_text("Login");
?>
" /></td>
					</tr>
				</table>
				</form>
			</td>
			<td rowspan="2"><img src="resource/images/login_04.gif" width="21" height="150" alt=""></td>
		</tr>
		<tr>
			<td><img src="resource/images/login_05.gif" width="320" height="19" alt="" style="padding-top: 4px;" /></td>
		</tr>
	</table>
</body>
</html>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:30,代码来源:login.php

示例8: include

<? 
include ("inc_security.php"); 
$fs_redirect	= base64_decode(getValue("returnurl","str","GET",base64_encode("listing.php")));
$record_id		= getValue("record_id","int","GET");

$myform 		= new generate_form();
$idNewRecord 	= $myform->copyRecord($fs_table,$field_id,$field_name,$record_id,'',"mnu_picture",$fs_filepath);
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
if($idNewRecord!=0){
	echo '<script language="javascript">alert("' . translate_text("You have successfully duplicated") . '!");</script>';
}else{
	echo '<script language="javascript">alert("' . str_replace("'","\'",translate_text("You have not successfully duplicated")) . '!");</script>';
}
redirect($fs_redirect);
?>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:15,代码来源:copy.php

示例9: form

<? /*------------------------------------------------------------------------------------------------*/ ?>
<?
$form = new form();
$form->create_form("form_name",$fs_action,"post","multipart/form-data",'onsubmit="validateForm();return false;"  id="form_name" ');
$form->create_table();		
?>
<?php 
echo $form->text_note('Những ô dấu sao (<font class="form_asterisk">*</font>) là bắt buộc phải nhập.');
echo $form->errorMsg($errorMsg);
?>

<?php 
echo $form->text(translate_text("Đường dẫn"), "seo_link", "seo_link", $seo_link, translate_text("link"), 1, 550, "", 255);
echo $form->text(translate_text("Tiêu đề"), "seo_title", "seo_title", $seo_title, translate_text("title"), 1, 250, "", 255);
echo $form->textarea(translate_text("Mô tả"), "seo_description", "seo_description", $seo_description, translate_text("description"), 1, 600, 120, "", "", "");
echo $form->textarea(translate_text("Từ khóa"), "seo_keyword", "seo_keyword", $seo_keyword, translate_text("keyword"), 1, 600, 120, "", "", "");
?>

<?php 
echo $form->radio("Sau khi lưu dữ liệu", "add_new" . $form->ec . "return_listing" . $form->ec . "return_edit", "after_save_data", $add . $form->ec . $listing . $form->ec . $edit, $after_save_data, "Thêm mới" . $form->ec . "Quay về danh sách" . $form->ec . "Sửa bản ghi", 0, "" . $form->ec . "" . $form->ec . "");
echo $form->button("submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "Cập nhật" . $form->ec . "Làm lại", "Cập nhật" . $form->ec . "Làm lại", 'style="background:url(' . $fs_imagepath . 'button_1.gif) no-repeat; border:none;"' . $form->ec . 'style="background:url(' . $fs_imagepath . 'button_2.gif) no-repeat; border:none;"', "");
?>
<br />
<?php 
echo $form->hidden("action", "action", "submitForm", "");
?>
<?
$form->close_table();
$form->close_form();
unset($form);
?>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:31,代码来源:add.php

示例10: require_once

<? //generate by dinhtoan@finalstyle.com
require_once("config_security.php");
//check quyền them sua xoa
$returnurl 		= base64_decode(getValue("returnurl","str","GET",base64_encode("configmodule.php")));
$record_id		= getValue("record_id","int","GET",0);
//Delete data with ID
$db_del = new db_execute("DELETE FROM modules WHERE mod_id =" . $record_id);
unset($db_del);
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">';
echo '<script language="javascript">alert("' . translate_text("You_have_successfully_deleted") . '")</script>';
redirect($returnurl);
?>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:12,代码来源:deletemodule.php

示例11: translate_text

?>
" /> <?php 
echo $cat["cat_name"];
?>
</li>
						<?
						}
						?>
					</ul>
				</td>
			</tr>
			</tbody>
			<tr valign="baseline"> 
			<td nowrap align="right"> </td>
			<td> <input type="button" class="bottom" onClick="document.add_user.submit();" value="<?php 
echo translate_text("Cập nhật");
?>
"> 
			</td>
			</tr>
			</table>
			<input type="hidden" name="Action" value="insert">
			</form>
		<? /*---------Body------------*/ ?>
<?php 
echo template_bottom();
?>
<? /*------------------------------------------------------------------------------------------------*/ ?>
</body>
<?
$db_getallmodule->close();
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:31,代码来源:add.php

示例12: base64_encode

echo base64_encode($css . '.bak');
?>
'" value="<?php 
echo translate_text("Restore this file");
?>
" class="form"></td>
         </tr>
      </table>
      </form>
   <?
	}else{
	?>
   	<table cellpadding="5" cellspacing="0" width="100%" class="table" bordercolor="#90B0E1" border="1">
      	<tr bgcolor="#f2f2f2">
         	<td class="bold"><?php 
echo translate_text("CSS Document name");
?>
</td>
            <td class="bold" width="20"><img src="<?php 
echo $fs_imagepath;
?>
edit.png" border="0" /></td>
         </tr>
         <?
         foreach(glob($cssPath . "*.css") as $name){
				$name = end(explode("/",$name));
			?>
         	<tr>
            	<td><a href="editcss.php?css=<?php 
echo base64_encode($name);
?>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:31,代码来源:editcss.php

示例13: db_query

$load_header 	.= '<script src="../../resource/js/library.js" type="text/javascript"></script>';

//phan ngon ngu admin
$db_language			= new db_query("SELECT tra_text,tra_keyword FROM admin_translate");
$langAdmin 				= array();
while($row=mysql_fetch_assoc($db_language->result)){
	$langAdmin[$row["tra_keyword"]] = $row["tra_text"];
}

//cau hinh
$db_con = new db_query("SELECT con_currency,con_exchange from configuration WHERE con_lang_id=" . $lang_id);
if ($row=mysql_fetch_array($db_con->result)){
	while (list($data_field, $data_value) = each($row)) {
		if (!is_int($data_field)){
			//tao ra cac bien config
			$$data_field = $data_value;
			//echo $data_field . "= $data_value <br>";
		}
	}
}
$db_con->close();
unset($db_con);

//cau hinh category
$array_value =	array(
	"static" => translate_text("Trang tĩnh"),
	"huong-dan" => translate_text("Hướng dẫn"),
	"tap-chi" => translate_text("Tạp chí"),
	"tuyen-dung" => translate_text("Tuyển dụng")
	);
?>
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:31,代码来源:security.php

示例14: translate_text

						$('#cat_parent_id').children('[data-type!='+cat_type+']').appendTo('#hidden');
				});  
				
				$('#cat_parent_id').change(function(e) {
					type = $('option:selected', this).attr('data-type');
					
					$('#cat_type').children('[value^='+type+']').attr('selected','selected');

				}).trigger('change'); 
			});
		</script>
    </td>
</tr>
<?php 
echo $form->text(translate_text("name"), "cat_name", "cat_name", $cat_name, translate_text("name"), 1, 250, "", 255);
echo $form->text(translate_text("link"), "cat_link", "cat_link", $cat_link, translate_text("link"), 0, 300, "", 255);
?>
<? 
if($array_config["order"]==1) echo $form->text(translate_text("order"),"cat_order","cat_order",$cat_order,translate_text("order"),1,50,"",255);
if($array_config["image"]==1) echo $form->getFile(translate_text("image"), "picture", "picture", translate_text("image"), 0, 32, "", '(Dung lượng tối đa <font color="#FF0000">' . $limit_size . ' Kb</font>)');
if($array_config["description"]==1) echo $form->textarea(translate_text("description"), "cat_description", "cat_description", $cat_description, translate_text("description"), 1, 600, 120, "", "", "");
// if($array_config["upper"]==1) echo $form->select_db_multi(translate_text("upper"), "cat_parent_id", "cat_parent_id", $listAll, "cat_id", "cat_name", $cat_parent_id, translate_text("upper"), "1", "200");
?>

<?php 
echo $form->radio("Sau khi lưu dữ liệu", "add_new" . $form->ec . "return_listing" . $form->ec . "return_edit", "after_save_data", $add . $form->ec . $listing . $form->ec . $edit, $after_save_data, "Thêm mới" . $form->ec . "Quay về danh sách" . $form->ec . "Sửa bản ghi", 0, "" . $form->ec . "" . $form->ec . "");
echo $form->button("submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "submit" . $form->ec . "reset", "Cập nhật" . $form->ec . "Làm lại", "Cập nhật" . $form->ec . "Làm lại", 'style="background:url(' . $fs_imagepath . 'button_1.gif) no-repeat; border:none;"' . $form->ec . 'style="background:url(' . $fs_imagepath . 'button_2.gif) no-repeat; border:none;"', "");
?>
<br />
<?php 
echo $form->hidden("action", "action", "submitForm", "");
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:31,代码来源:edit.php

示例15: translate_text

" onclick="showhidden(<?php 
echo $i;
?>
);" title="<?php 
echo translate_text("Xem danh sách");
?>
" /></td>
						<td class="t"><span style="cursor:pointer; font-weight: bold; color: #1D5994;" onclick="showhidden(<?php 
echo $i;
?>
);"><?php 
echo $row["mod_name"];
?>
</span></td>
						<td width="10"><img src="resource/images/arrow.png" title="<?php 
echo translate_text("Move");
?>
" class="handle" /></td>
					</tr>
					<tbody id="showmneu_<?php 
echo $i;
?>
" bgcolor="#FFFFFF" style="display:none">
						<?
						//$id_tab = $row["mod_id"];
						$title_tab = $row["mod_name"];
						$arraySub = explode("|",$row["mod_listname"]);
						$arrayUrl = explode("|",$row["mod_listfile"]);

						foreach($arraySub as $key=>$value){
							$url = isset($arrayUrl[$key]) ? $arrayUrl[$key] : '#';
开发者ID:nhphong0104,项目名称:thietkeweb360,代码行数:31,代码来源:inc_left.php


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