本文整理匯總了PHP中Lang::tr方法的典型用法代碼示例。如果您正苦於以下問題:PHP Lang::tr方法的具體用法?PHP Lang::tr怎麽用?PHP Lang::tr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Lang
的用法示例。
在下文中一共展示了Lang::tr方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: showFeedback
/**
* Allows to show a feedback button on the menu
*/
private function showFeedback()
{
$confFeedback = Config::get('feedback');
if ($confFeedback['enabled'] && $confFeedback['url']) {
echo "<li>";
echo " <a id='feedback' href='" . $confFeedback['url'] . "' target='_blank' data-tooltip aria-haspopup='true'";
echo " title='" . Lang::tr('User feedback form') . "'>" . Lang::tr('Feedback');
echo " </a>";
echo "</li>";
}
}
示例2: formatDate
/**
* Format a date according to configuration
*
* @param integer $timestamp php timestamp to format to date or null to use current date
* @param bool $with_time
*
* @return string formatted date
*/
public static function formatDate($timestamp = null, $with_time = false)
{
$lid = $with_time ? 'datetime_format' : 'date_format';
$dateFormat = Lang::tr($lid);
if ($dateFormat == '{date_format}') {
$dateFormat = 'Y-m-d';
}
if ($dateFormat == '{datetime_format}') {
$dateFormat = 'Y-m-d H:i:s';
}
return date($dateFormat, is_null($timestamp) ? time() : $timestamp);
}
示例3: LANG
function LANG($msgCode)
{
return Lang::tr($msgCode);
}
示例4: NotesFooterResources
<?php
$resources = new NotesFooterResources();
$resources->showFooterResources();
?>
<li>
<ul>
<li><h2>Contactez-nous</h2></li>
<li><i class="fi-marker"></i>23-25, rue Daviel - 75013 PARIS</li>
<?php
$confFeedback = Config::get('feedback');
if ($confFeedback['enabled'] && $confFeedback['url']) {
echo "<li>";
echo " <i class='fa fa-comments'></i><a id='feedback' href='" . $confFeedback['url'] . "' target='_blank' data-tooltip aria-haspopup='true'";
echo " title='" . Lang::tr('User feedback form') . "'>" . Lang::tr('Feedback');
echo " </a>";
echo "</li>";
}
?>
</ul>
</li>
</ul>
</article>
</footer>
<div class="footer-copyright row">
© <?php
echo 'RENATER ' . date('Y') . ' - ' . Lang::tr('All rights reserved.');
?>
</div>
示例5:
<?php
/*
* This file is part of the Notes project.
* 2013 - 2015 / RENATER
*/
?>
<div id='container_pad_link' class='hidden'>
<br/>
<?php
echo Lang::tr('This is the link to access your pad:');
?>
<br/><br/>
<input type='text' id='current_pad_link' value='' />
</div>
示例6: catch
<?php
/*
* This file is part of the Notes project.
* 2013 - 2015 / RENATER
*/
$errorMsg = '';
$attributesGot = true;
// Get error strings
if (!Auth::isAuthorized()) {
try {
$errorMsg = Lang::tr(Auth::user()->HTTP_SHIB_IDENTITY_PROVIDER == 'urn:mace:cru.fr:federation:sac' ? 'You are connected but CRU accounts are not enabled for users from your organisation for Notes.' : 'Your organisation did not release sufficient information about you in order to use this service.');
} catch (PropertyAccessException $e) {
$errorMsg = Lang::tr('Your organisation did not release sufficient information about you in order to use this service.');
$attributesGot = false;
}
}
?>
<article class="alert-box alert radius row">
<p class="centertext">
<?php
echo $errorMsg;
?>
</p>
</article>
示例7: formatBytes
/**
* Format size
*
* @param int $bytes
*
* @return string
*/
public static function formatBytes($bytes, $precision = 1)
{
// Default
if (!$precision || !is_numeric($precision)) {
$precision = 2;
}
// Variants
$unit = Lang::tr('size_unit')->out();
if ($unit == '{size_unit}') {
$unit = 'b';
}
$multipliers = array('', 'k', 'M', 'G', 'T');
// Compute multiplier
$bytes = max($bytes, 0);
$pow = floor(($bytes ? log($bytes) : 0) / log(1024));
$pow = min($pow, count($multipliers) - 1);
$bytes /= pow(1024, $pow);
return round($bytes, $precision) . ' ' . $multipliers[$pow] . $unit;
}
示例8:
<div id='container_pad_link' class='hidden'>
<br/>
<?php
echo Lang::tr('This is the link to access your pad:');
?>
<br/><br/>
<input type='text' id='current_pad_link' value='' />
</div>
<div id='container_delete_pad' class='hidden'>
<br/>
<?php
echo Lang::tr('Are you sure you want to delete this pad ?');
?>
<br/><br/>
<p style="font-weight: bold;text-align: center;"><?php
echo Lang::tr('Warning!');
?>
</p>
<br/>
<?php
echo Lang::tr('All datas will be lost, continue?');
?>
</div>-->
<?php
}
}
示例9:
<thead>
<tr>
<th><?php
echo Lang::tr('Pad name');
?>
</th>
<th><?php
echo Lang::tr('Creation date');
?>
</th>
<th><?php
echo Lang::tr('Last update date');
?>
</th>
<th><?php
echo Lang::tr('Action');
?>
</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
-->
<div id="sondagesContainer" class='table-responsive row'>
<div>
<h4> Mes sondages ...
<hr>
<!-- TODO : ajouter list/table pour afficher la liste des sondages où je suis l'organisateur -->
示例10:
<?php
/*
* This file is part of the Notes project.
* 2013 - 2015 / RENATER
*/
?>
<div id='warning'>
<h1><i class="fa fa-exclamation-triangle"></i> <?php
echo Lang::tr('A problem happened while trying to get your pads.');
?>
</h1>
<p><?php
echo Lang::tr('It seems that the Etherpad application is not available for now.');
?>
</p>
<p><?php
$supportEmail = Config::get('support_email');
if ($supportEmail) {
echo Lang::tr('If the problem persists, do not hesitate to contact ');
echo " <a href='mailto:" . $supportEmail . "'>" . $supportEmail . "</a>";
}
?>
</p>
</div>
示例11: function
$config['use_application_cache'] = true;
$config['auth_sp_fake_authenticated'] = true;
$config['auth_sp_fake_email'] = 'eric.hebert@renater.fr';
$config['auth_sp_type'] = 'fake';
//$config['auth_sp_type'] = 'shibboleth';
//$config['auth_sp_shibboleth_email_attribute'] = 'HTTP_MAIL';
//$config['auth_sp_shibboleth_login_url'] = '#';
//$config['auth_sp_shibboleth_logout_url'] = '#';
$config['site_url'] = 'http://notes';
$config['wayf_url'] = 'https://discovery.renater.fr/test/WAYF';
$config['sp_handler_url'] = 'http://dev-web.renater.fr/';
$config['server_name'] = 'http://notes';
$config['email_reply_to_name'] = 'Notes';
$config['site_name'] = 'Notes';
$config["db_type"] = "mysql";
//$config['db_host'] = 'localhost';
$config['db_host'] = '127.0.0.1';
$config['db_database'] = 'notes';
$config['db_port'] = '8889';
// database username and password
$config['db_username'] = 'root';
$config['db_password'] = 'root';
$config['etherpad-url-pads'] = "http://dev-web.renater.fr/pad/p/";
$config['etherpad-url'] = "http://dev-web.renater.fr/pad/api/1.2.10/";
$config['etherpad-group-id'] = "g.SusPSroDjraDRae6";
$config['etherpad-apikey'] = "7fef00b5f0c28ede6e2bc912989ca7722a3aefcfa0fbe26c401e442184d4d3ea";
$config['etherpad-default-text'] = function () {
return (string) Lang::tr('Welcome to ehterpad!');
};
$config['homelink_enabled_in_menu'] = true;
$config['pads']['enable_instant_pad'] = true;
示例12:
<?php
echo Lang::tr("Docs is a collaborative editing service in real-time powered by Etherpad, for the RENATER community.");
?>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris non aliquet neque, sit amet tempor leo.
</p>
<p class="small-12 medium-6 columns">
Pellentesque egestas neque non augue mollis finibus. Proin facilisis sit amet dolor ut ullamcorper. Vivamus sagittis nunc quis metus mollis egestas.
Fusce nec sapien nec tortor consequat eleifend. Cras tempor enim et erat suscipit convallis. Nunc gravida libero arcu, nec consectetur mi maximus eget.
</p>
</article>
<?php
if (!Auth::isAuthenticated()) {
?>
<article class="small-12 columns centertext">
<h3><?php
echo Lang::tr("To create or manage your pads, you must be authentified.");
?>
</h3>
</article>
<?php
}
?>
</main>
<?php
if (!Auth::isAuthenticated()) {
?>
<section class="disconnected">
<article class="row ">
</article>
</section>
示例13: showLogoutButton
/**
* Allows to show the logout button
*/
private function showLogoutButton()
{
if ($this->allRights) {
echo "<li>";
echo " <a id='disconnectButton' href='#' title='" . Lang::tr('Logout') . "'><i class='fi-power'></i><label>" . Lang::tr('Logout') . "<span>(" . Auth::user()->email . ")</span></label></a>";
echo "</li>";
}
}
示例14:
</h1>
</header>
<noscript class="row" >
<style>
section:nth-of-type(1), #title_owned_conf,#title_invited_conf{
display:none!important;
}
</style>
<main class="alert alert-warning">
<p><?php
echo Lang::tr('Javascript is currently disabled on your browser.');
?>
</p>
<p><?php
echo Lang::tr('Reactivate it to manage your pads.');
?>
</p>
<p><img src="<?php
echo Config::get('site_url') . '/lib/images/logo_notes.png';
?>
" alt="Logo Notes"></p>
<p><?php
echo Lang::tr('For any additional request, you can contact the support:');
?>
<a href='mailto:support@renater.fr'>support@renater.fr</a> </p>
</main>
</noscript>
示例15:
<?php
/*
* This file is part of the Notes project.
* 2013 - 2015 / RENATER
*/
?>
<div id="open_pad" class="hidden">
<h1><?php
echo Lang::tr('This pas already exists.');
?>
</h1><br/>
<p><?php
echo Lang::tr('Do you want to access now to this pad?');
?>
</p>
</div>