本文整理汇总了PHP中Core::translateToCurrentLocale方法的典型用法代码示例。如果您正苦于以下问题:PHP Core::translateToCurrentLocale方法的具体用法?PHP Core::translateToCurrentLocale怎么用?PHP Core::translateToCurrentLocale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Core
的用法示例。
在下文中一共展示了Core::translateToCurrentLocale方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: register
public static function register()
{
$email = Core::validate(self::getVar('email'));
$pass = Core::validate(self::getVar('password'));
$captcha = Core::validate(self::getVar('captcha'));
if ($email == null || $pass == null || $captcha == null) {
Core::printErrorJson('Incorrect data input');
return;
}
$right_code = Session::getSessionVariable('security_code');
Session::unsetSessionVariable('security_code');
if ($captcha != $right_code) {
Core::printErrorJson('Incorrect captcha');
return;
}
if (!Core::isEmailAddress($email)) {
Core::printErrorJson('Incorrect email');
return;
}
if (User::isExist($email, $email)) {
Core::printErrorJson('User ' . $email . ' is already registered.');
return;
}
$usr = new User();
$usr->setLogin($email);
$usr->setEmail($email);
$usr->setDate(date("Y-m-d H:i:s"));
$usr->setActivation(0);
$usr->setPassHash(Core::calculateHash($pass));
$usr->insert();
$activationCode = self::calcActivationCode($usr);
$activationUrl = "http://" . $_SERVER['SERVER_NAME'] . "/usr/activation?login=" . urlencode($email) . "&code=" . $activationCode;
$subject = Core::translateToCurrentLocale("Registration confirmation") . ".";
$header = '<h1>' . Core::translateToCurrentLocale("Hello") . ', </h1>
<p class="lead">' . Core::translateToCurrentLocale("you have registered on the Bitmonex website") . '.</p>' . '<p>' . Core::translateToCurrentLocale("Your login is") . ': ' . $email . '</p><p>' . Core::translateToCurrentLocale("Your password is") . ': ' . $pass . '</p>';
$body = '<p>' . Core::translateToCurrentLocale("To confirm your registration, please click on this link") . '. <a href="' . $activationUrl . '">' . Core::translateToCurrentLocale("Activate") . '!</a></p>';
$message = self::getMessage($header, $body);
if (!Core::send_mail($email, $subject, $message)) {
$usr->delete();
Core::printErrorJson('Notification email is not send.');
return;
}
$result['success'] = 1;
print json_encode($result);
}
示例2: foreach
?>
</td>
<td>
<?php
print $value['Part'];
?>
</td>
<td>
<?php
if ($value['Status'] == 'Active') {
?>
<input class="btn" type="button" onclick="orders.CancelFromHistory('<?php
print $value['id'];
?>
');" value="<?php
print Core::translateToCurrentLocale('Cancel');
?>
">
<?php
}
?>
</td>
</tr>
<?php
if (count($value['deals']) > 0) {
?>
<?php
foreach ($value['deals'] as $deal) {
?>
<tr class="deal" style="display: none; position:relative;">
<td></td>
示例3: foreach
print $lang;
?>
" type="text" name="<?php
print $lang;
?>
" placeholder="<?php
print $lang;
?>
"">
</td>
<?php
}
?>
<td>
<input id="submit" type="submit" value="<?php
print Core::translateToCurrentLocale('Add');
?>
">
</td>
</form>
</tr>
<?php
foreach ($data['localizationList'] as $value) {
?>
<tr id='<?php
print $value['id'];
?>
'>
<?php
foreach ($data['languages'] as $lang) {
?>
示例4: function
amount: amount
},
dataType: 'json',
success: function(result) {
window.location = result.location;
}
});
}
</script>
<form method="get" class="form-money form-horizontal in" role="form" name="LTC_in" style="display: none" action="/money/LTC_transaction">
<div id="ltc-code"><pre> </pre></div>
<input class="btn" onclick="generateLTCCode(this);" type="button" value="<?php
print Core::translateToCurrentLocale('Get code');
?>
">
</form>
<form onsubmit="submitLTCOutput(this);" method="post" class="form-money form-horizontal" role="form" name="LTC_out" style="display: none" action="/money/LTC_transaction_o">
<div class="submit-dialog-captions"><?php
print Core::translateToCurrentLocale("Address");
?>
:</div>
<input type="text" name="address"><br>
<div class="submit-dialog-captions"><?php
print Core::translateToCurrentLocale("Amount");
?>
:</div>
<input type="text" name="amount"><br>
<input class="btn" type="submit" value="Submit">
</form>
示例5:
<li <?php
if ($activeMenu == 'Order settings') {
print $activeClass;
}
?>
><a href="/admin/order_settings"><?php
print Core::translateToCurrentLocale('Order settings');
?>
</a></li>
<li <?php
if ($activeMenu == 'News') {
print $activeClass;
}
?>
><a href="/admin/news"><?php
print Core::translateToCurrentLocale('News');
?>
</a></li>
<li <?php
if ($activeMenu == 'Order priority') {
print $activeClass;
}
?>
><a href="/admin/order_priority"><?php
print Core::translateToCurrentLocale('Order priority');
?>
</a></li>
<?php
}
?>
</ul>
示例6:
<input type="hidden" name="NOPAYMENT_URL" value="<?php
print 'http://' . Core::server_url() . '/money/PM_transaction' . '_cancel';
?>
">
<input type="hidden" name="NOPAYMENT_URL_METHOD" value="POST">
<input class="btn" type="submit" value="<?php
print Core::translateToCurrentLocale('In');
?>
">
</form>
<form onsubmit="submitPMOutput(this);" method="POST" class="form-money form-horizontal" role="form" name='PM_out' style="display: none" action="/money/PM_transaction_o">
<input type="hidden" name="fiat" value="<?php
print $data['CurName'];
?>
">
<div class="submit-dialog-captions"><?php
print Core::translateToCurrentLocale('Amount');
?>
:</div>
<input type="text" name="amount" value=""><br>
<div class="submit-dialog-captions"><?php
print Core::translateToCurrentLocale('Account');
?>
:</div>
<input type="text" name="account" value=""><br>
<input class="btn" type="submit" value="<?php
print Core::translateToCurrentLocale('Out');
?>
">
</form>
示例7:
<div class="modal-dialog" style="width:300px;">
<div class="modal-content">
<div class="modal-header" style="text-align: center">
<?php
print Core::translateToCurrentLocale('Loading...');
?>
</div>
<div class="modal-body">
<div style="height:100px">
<span id="modalSpinner" style="position: absolute;display: block;top: 50%;left: 50%;"></span>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$.fn.ready(function(){
PopupLoader.show();
});
</script>
示例8:
<td>
<?php
print $value['amount'] * $value['rate'];
?>
<?php
print $currentRate['secondCurrency'];
?>
</td>
</tr>
<?php
}
?>
<?php
} else {
?>
<tr>
<td colspan="5">
<?php
print Core::translateToCurrentLocale('No trades');
?>
.
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</div>
</div>
示例9:
if (isset($_GET['Data'])) {
$page = $_GET['Data'];
if ($page != null) {
$widgets = widgetControl::getPageWidgets($page);
} else {
$widgets = widgetControl::getPageWidgets(0);
}
}
}
?>
<!-- DashBoard -->
<div id="dashboard" class="dashboard col-xs-9">
<div class="topHead" style="margin-bottom:0px;">
<span class="greenMark"><?php
print Core::translateToCurrentLocale("Dashboard");
?>
</span>
<div class="line"></div>
</div>
<div class="widgetPager">
<?php
$data = $widgets[0]['rate'];
print Core::runView('Shared/widgetpager', $data);
$currentRate = $widgets[0]['rate'];
?>
</div>
<?php
foreach ($widgets as $key => $value) {
?>
<a name="<?php
示例10: foreach
<tr>
<td>
<span class="greenMark"><?php
print Core::translateToCurrentLocale('Name');
?>
</span>
</td>
<td>
<span class="greenMark"><?php
print Core::translateToCurrentLocale('Full name');
?>
</span>
</td>
<td>
<span class="greenMark"><?php
print Core::translateToCurrentLocale('Min order amount');
?>
</span>
</td>
</tr>
<?php
foreach ($data['currencies'] as $value) {
?>
<tr id='<?php
print $value['id'];
?>
'>
<td>
<span class="greenMark"><?php
print $value['Name'];
?>
示例11: function
address: address,
amount: amount
},
dataType: 'json',
success: function(result) {
window.location = result.location;
}
});
}
</script>
<form method="get" class="form-money in" name="BTC_in" style="display: none" action="/money/BTC_transaction">
<div id="btc-code"><pre> </pre></div>
<input class="btn" onclick="generateBTCCode(this);" type="button" value="<?php
print Core::translateToCurrentLocale('Get code');
?>
">
</form>
<form role="form" onsubmit="submitBTCOutput(this);" method="post" class="form-money form-horizontal" name="BTC_out" style="display: none" action="/money/BTC_transaction_o">
<div class="submit-dialog-captions"><?php
print Core::translateToCurrentLocale("Address");
?>
:</div>
<input type="text" name="address"><br>
<div class="submit-dialog-captions"><?php
print Core::translateToCurrentLocale('Amount');
?>
:</div>
<input type="text" name="amount"><br>
<input class="btn" type="submit" value="Submit">
</form>
示例12: DateTime
$newsItem['date'] = new DateTime($newsItem['date']);
$newsItem['date'] = $newsItem['date']->format('y/m/d');
$wordsArray = explode(' ', $newsItem['full']);
if (count($wordsArray) >= 50) {
$firstPiece = array_slice($wordsArray, 0, 50);
$secondPiece = array_slice($wordsArray, 50, count($wordsArray));
$moreLabel = '<span id="widgetNewsMoreLabel" class="widgetNewsMoreLabel">... <a>' . Core::translateToCurrentLocale('Read more') . '</a></span>';
$result = implode($firstPiece, ' ') . $moreLabel . '<div id="widgetNewsItemFull" class="widgetNewsItemFull">' . implode($secondPiece, ' ') . '</div>';
} else {
$result = $newsItem['full'];
}
?>
<div class="widgetNews clearfix">
<h3 class="widgetName"><?php
print Core::translateToCurrentLocale('News');
?>
</h3>
<div class="widgetNewsContainer">
<div class="widgetNewsItem">
<div class="widgetNewsItemTop clearfix">
<strong class="widgetNewsItemDate left"><?php
print $newsItem['date'];
?>
</strong>
<h4 class="widgetNewsItemTitle left"><?php
print $newsItem['title'];
?>
</h4>
</div>
<div class="widgetNewsItemContent">
示例13: foreach
?>
</span></td>
<td><span class="greenMark"><?php
print Core::translateToCurrentLocale('Input max');
?>
</span></td>
<td><span class="greenMark"><?php
print Core::translateToCurrentLocale('Output fee');
?>
</span></td>
<td><span class="greenMark"><?php
print Core::translateToCurrentLocale('Output min');
?>
</span></td>
<td><span class="greenMark"><?php
print Core::translateToCurrentLocale('Output max');
?>
</span></td>
</tr>
<?php
foreach ($data['io_fees'] as $value) {
?>
<tr id='<?php
print $value['id'];
?>
'>
<td><span class="greenMark"><?php
print $value['currencyName'];
?>
</span></td>
<td><span class="greenMark"><?php
示例14:
<form accept-charset="UTF-8" role="form" method="post" action="/usr/login">
<fieldset>
<div class="form-group">
<input class="form-control" placeholder="<?php
print Core::translateToCurrentLocale('Login');
?>
" name="login" type="text">
</div>
<div class="form-group">
<input class="form-control" placeholder="<?php
print Core::translateToCurrentLocale('Password');
?>
" name="pass" type="password" value="">
</div>
<input class="btn btn-lg btn-success btn-block" type="submit" value="<?php
print Core::translateToCurrentLocale('Login');
?>
" style="">
</fieldset>
</form>
</div>
</div>
</div>
</div>
</ul>
</li>
<?php
}
?>
</ul>
</div><!--/.navbar-collapse -->
示例15:
"high":
"low":
"avg":
"first":
"last":
"vol":
"vol_cur":
"time": (unix-time)
"ask":
"bid":
]
*/
?>
<div class="title greenMark"><?php
print Core::translateToCurrentLocale('Price graph');
?>
</div>
<div class="right"><img id="barsMe" src="/public/img/other/circleness.png"/></div>
<div id="graphicRender" class="graphicRender"></div>
<script>
graphParams.params = jQuery.parseJSON('{ "firstCurrency": "' + "<?php
print $currentRate['firstCurrency'];
?>
" +
'","secondCurrency": "' + "<?php
print $currentRate['secondCurrency'];
?>
" + '", "period": "' + graphParams.period + '", "interval": "'+ graphParams.interval + '"}');