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


PHP pi18n函数代码示例

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


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

示例1: displayFreeModule

function displayFreeModule($module, $activatedModules)
{
    $activated = false;
    foreach ($activatedModules as $actMod) {
        if ($actMod == $module) {
            $activated = true;
            break;
        }
    }
    ?>
<div class="row">
	<input type="checkbox" name="modules[]" id="module-<?php 
    echo \Pasteque\esc_attr($module);
    ?>
" value="<?php 
    echo \Pasteque\esc_attr($module);
    ?>
" <?php 
    if ($activated) {
        echo "checked=\"true\"";
    }
    ?>
 />
	<label for="module-<?php 
    echo \Pasteque\esc_attr($module);
    ?>
"><?php 
    \pi18n($module, PLUGIN_NAME);
    ?>
</label>
</div>
<?php 
}
开发者ID:booko,项目名称:pasteque-server,代码行数:33,代码来源:modules.php

示例2: show_update

function show_update($dbVer)
{
    tpl_open();
    ?>
<h1><?php 
    \pi18n("Update");
    ?>
</h1>
<p><?php 
    \pi18n("Update notice");
    ?>
</p>
<form action="<?php 
    echo \Pasteque\get_current_url();
    ?>
" method="post">
    <?php 
    form_value_hidden("update", "update", $dbVer);
    ?>
    <label for="country"><?php 
    \pi18n("Pays");
    ?>
    <select id="country" name="country">
        <option value="belgique">Belgique</option>
        <option value="france">France</option>
        <option value="luxembourg">Luxembourg</option>
        <option value="united_kingdom">United Kingdom</option>
    </select>
    <?php 
    \Pasteque\form_send();
    ?>
</form>
<?php 
    tpl_close();
}
开发者ID:booko,项目名称:pasteque-server,代码行数:35,代码来源:install.php

示例3: count

    ?>
</div>
<?php 
} else {
    ?>
<p><?php 
    \pi18n("%d compositions", PLUGIN_NAME, count($compositions));
    ?>
</p>

<table cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th></th>
            <th><?php 
    \pi18n("Composition.label");
    ?>
</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
<?php 
    $par = false;
    foreach ($compositions as $composition) {
        $par = !$par;
        if ($composition->hasImage) {
            $imgSrc = \Pasteque\PT::URL_ACTION_PARAM . "=img&w=product&id=" . $composition->id;
        } else {
            $imgSrc = \Pasteque\PT::URL_ACTION_PARAM . "=img&w=product";
        }
开发者ID:pinaraf,项目名称:pasteque-server,代码行数:31,代码来源:composition.php

示例4: function

<script type="text/javascript">

	addProduct = function(productId) {
		var product = catalog.products[productId];
		if (jQuery("#line-" + productId).length > 0) {
			// Add quantity to existing line
			var qty = jQuery("#line-" + productId + "-qty");
			var currVal = qty.val();
			qty.val(parseInt(currVal) + 1);
		} else {
			// Add line
			var html = "<tr id=\"line-" + product['id'] + "\">\n";
			html += "<td><img class=\"thumbnail\" src=\"" + product['img'] + "\" /></td>\n";
			html += "<td>" + product['reference'] + "</td>\n";
			html += "<td>" + product['label'] + "</td>\n";
			html += "<td class=\"qty-cell\"><input class=\"qty\" id=\"line-" + product['id'] + "-qty\" type=\"numeric\" name=\"qty-" + product['id'] + "\" value=\"1\" />\n";
			html += "<td><a class=\"btn-delete\" href=\"\" onClick=\"javascript:deleteLine('" + product['id'] + "');return false;\"><?php 
\pi18n("Delete");
?>
</a></td>\n";
			html += "</tr>\n"; 
			jQuery("#list").append(html);
		}
	}

	deleteLine = function(productId) {
		jQuery("#line-" + productId).detach();
	}

</script>
<?php 
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:tags.php

示例5: foreach

</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
<?php 
foreach ($currencies as $currency) {
    ?>
	<tr>
		<td><?php 
    echo $currency->label;
    ?>
</td>
		<td><?php 
    if ($currency->isMain) {
        \pi18n("Main", PLUGIN_NAME);
    } else {
        echo $currency->rate;
    }
    ?>
</td>
		<td class="edition">
            <?php 
    \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'currency_edit', array("id" => $currency->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit'));
    ?>
			<form action="<?php 
    echo \Pasteque\get_current_url();
    ?>
" method="post"><?php 
    \Pasteque\form_delete("currency", $currency->id, \Pasteque\get_template_url() . 'img/delete.png');
    ?>
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:currencies.php

示例6: array

        $user = new \Pasteque\User($_POST['name'], null, null, $_POST['roleId'], true, false);
        $id = $srv->create($user);
        if ($id !== false) {
            $message = \i18n("User saved. <a href=\"%s\">Go to the user page</a>.", PLUGIN_NAME, \Pasteque\get_module_url_action(PLUGIN_NAME, 'user_edit', array('id' => $id)));
        } else {
            $error = \i18n("Unable to save changes");
        }
    }
}
$user = null;
if (isset($_GET['id'])) {
    $user = $srv->get($_GET['id']);
}
?>
<h1><?php 
\pi18n("Edit an user", PLUGIN_NAME);
?>
</h1>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>

<form class="edit" action="<?php 
echo \Pasteque\get_current_url();
?>
" method="post">
    <?php 
\Pasteque\form_hidden("edit", $user, "id");
?>
	<?php 
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:user_edit.php

示例7: foreach

        ?>
</th>
			<th><?php 
        \pi18n("Stock.SellValue");
        ?>
</th>
			<th><?php 
        \pi18n("Stock.BuyValue");
        ?>
</th>
			<th><?php 
        \pi18n("QuantityMin");
        ?>
</th>
			<th><?php 
        \pi18n("QuantityMax");
        ?>
</th>
		</tr>
	</thead>
	<tbody>
<?php 
        foreach ($prdCat[$category->id] as $product) {
            if (!isset($prdLevel[$product->id])) {
                continue;
            }
            // Level lines
            $par = !$par;
            $prdRef = "";
            $prdLabel = "";
            $imgSrc = "";
开发者ID:pinaraf,项目名称:pasteque-server,代码行数:31,代码来源:inventory.php

示例8: array

        $cashReg = new \Pasteque\CashRegister($_POST['label'], $_POST['locationId']);
        $id = $srv->create($cashReg);
        if ($id !== false) {
            $message = \i18n("Cash register saved. <a href=\"%s\">Go to the cash register page</a>.", PLUGIN_NAME, \Pasteque\get_module_url_action(PLUGIN_NAME, 'cashregister_edit', array('id' => $id)));
        } else {
            $error = \i18n("Unable to save changes");
        }
    }
}
$cashReg = null;
if (isset($_GET['id'])) {
    $cashReg = $srv->get($_GET['id']);
}
?>
<h1><?php 
\pi18n("Edit a cash register", PLUGIN_NAME);
?>
</h1>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>

<form class="edit" action="<?php 
echo \Pasteque\get_current_url();
?>
" method="post" enctype="multipart/form-data">
    <?php 
\Pasteque\form_hidden("edit", $cashReg, "id");
?>
	<?php 
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:cashregister_edit.php

示例9: opendir

//    Pastèque is distributed in the hope that it will be useful,
//    but WITHOUT ANY WARRANTY; without even the implied warranty of
//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//    GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License
//    along with Pastèque.  If not, see <http://www.gnu.org/licenses/>.
namespace BaseBackup;

?>
<h1><?php 
\pi18n("Backup", PLUGIN_NAME);
?>
</h1>
<div class="hint"><p><?php 
\pi18n("Backup_help", PLUGIN_NAME);
?>
</p></div><?php 
$user_id = \Pasteque\get_user_id();
$dbhost = \Pasteque\get_db_host($user_id);
$dbuser = \Pasteque\get_db_user($user_id);
$dbpasswd = \Pasteque\get_db_password($user_id);
$database = \Pasteque\get_db_name($user_id);
$dbport = \Pasteque\get_db_port($user_id);
// Looking for an existing file (we do only allow one dump per day)
// Filename scheme is pasteque-[date]-[database]-[randomstring].sql.gz
// randomstring is for security, to make URL unfindable
// Tip: create a firewall rule to ban bruteforce on this randomstring
$dir = opendir("cache");
while (($f = readdir($dir)) != false) {
    if (preg_match("/pasteque-[0-9]{8}-" . $database . "-.[a-z0-9]*.sql.gz/", $f) == 1) {
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:backup.php

示例10:

		<?php 
if ($category !== null && $category->hasImage) {
    ?>
			<img id="img" class="image-preview" src="?<?php 
    echo \Pasteque\PT::URL_ACTION_PARAM;
    ?>
=img&w=category&id=<?php 
    echo $category->id;
    ?>
" />
			<a class="btn" id="clear" href="" onClick="javascript:clearImage(); return false;"><?php 
    \pi18n("Delete");
    ?>
</a>
			<a class="btn" style="display:none" id="restore" href="" onClick="javascript:restoreImage(); return false;"><?php 
    \pi18n("Restore");
    ?>
</a><br />
		<?php 
}
?>
			<input type="file" name="image" />
		</div>
	</div>

	<div class="row actions">
		<?php 
\Pasteque\form_save();
?>
	</div>
</form>
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:category_edit.php

示例11:

    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</div>

<h1><?php 
\pi18n("Main title");
?>
</h1>

<p><?php 
\pi18n("Introduction");
?>
</p>

<h2><?php 
\pi18n("Download");
?>
</h2>
    <p><?php 
\pi18n("Download instructions");
?>
</p>

<h2><?php 
\pi18n("Documentation");
?>
</h2>
    <p><?php 
\pi18n("Documentation instructions");
?>
</p>
<?php 
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:home.php

示例12: count

</a></p>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>

<p><?php 
\pi18n("%d roles", PLUGIN_NAME, count($roles));
?>
</p>

<table cellspacing="0" cellpadding="0">
	<thead>
		<tr>
			<th><?php 
\pi18n("Role.name");
?>
</th>
			<th></th>
		</tr>
	</thead>
	<tbody>
<?php 
foreach ($roles as $role) {
    ?>
	<tr>
		<td><?php 
    echo $role->name;
    ?>
</td>
		<td class="edition">
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:roles.php

示例13: pi18n

        <div>
            <div id="product-sub-container" class="product-container"></div>
        </div>
    </fieldset>
    </div>
    <!-- to change -->
    <div id="product" class="row">
        <fieldSet>
            <legend><?php 
\pi18n('Product', PLUGIN_NAME);
?>
</legend>
            <div id="catalog-picker"></div>
            <div class="row" id="btnAddAllPrd">
                <input type="button" onclick="javascript:addAllPrd()" value="<?php 
pi18n('Add all products of the category', PLUGIN_NAME);
?>
">
            </div>
        </fieldSet>
    </div>
</div>
<input type="hidden" name="subgroupData" id="subgroupData" />
        <?php 
\Pasteque\form_save();
?>
</form>

<?php 
\Pasteque\init_catalog("catalog", "catalog-picker", "productPicked", $categories, $products);
?>
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:composition_edit.php

示例14: array

		<td><?php 
    echo $area->label;
    ?>
</td>
		<td class="edition">
            <?php 
    \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'area_edit', array("id" => $area->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit'));
    ?>
			<form action="<?php 
    echo \Pasteque\get_current_url();
    ?>
" method="post"><?php 
    \Pasteque\form_delete("area", $area->id, \Pasteque\get_template_url() . 'img/delete.png');
    ?>
</form>
		</td>
	</tr>
<?php 
}
?>
	</tbody>
</table>
<?php 
if (count($areas) == 0) {
    ?>
<div class="alert"><?php 
    \pi18n("No area found", PLUGIN_NAME);
    ?>
</div>
<?php 
}
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:areas.php

示例15:

                    \pi18n('Edit');
                    ?>
" title="<?php 
                    \pi18n('Edit');
                    ?>
"></a>
		</td>
	</tr>
>>>>>>> Get rid of par for odd/even, CSS RULES
<?php 
                }
            }
            ?>
    </tbody>
</table>
<?php 
        }
    }
}
// archive end
?>

<?php 
if (count($products) == 0) {
    ?>
<div class="alert"><?php 
    \pi18n("No product found", PLUGIN_NAME);
    ?>
</div>
<?php 
}
开发者ID:booko,项目名称:pasteque-server,代码行数:31,代码来源:products.php


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