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


PHP I18N::digits方法代码示例

本文整理汇总了PHP中Fisharebest\Webtrees\I18N::digits方法的典型用法代码示例。如果您正苦于以下问题:PHP I18N::digits方法的具体用法?PHP I18N::digits怎么用?PHP I18N::digits使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Fisharebest\Webtrees\I18N的用法示例。


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

示例1: hitCountQuery

 /**
  * These functions provide access to hitcounter for use in the HTML block.
  *
  * @param string   $page_name
  * @param string[] $params
  *
  * @return string
  */
 private function hitCountQuery($page_name, $params)
 {
     if (is_array($params) && isset($params[0]) && $params[0] != '') {
         $page_parameter = $params[0];
     } else {
         $page_parameter = '';
     }
     if ($page_name === null) {
         // index.php?ctype=gedcom
         $page_name = 'index.php';
         $page_parameter = 'gedcom:' . ($page_parameter ? Tree::findByName($page_parameter)->getTreeId() : $this->tree->getTreeId());
     } elseif ($page_name == 'index.php') {
         // index.php?ctype=user
         $user = User::findByIdentifier($page_parameter);
         $page_parameter = 'user:' . ($user ? $user->getUserId() : Auth::id());
     } else {
         // indi/fam/sour/etc.
     }
     return '<span class="odometer">' . I18N::digits(HitCounter::getCount($this->tree, $page_name, $page_parameter)) . '</span>';
 }
开发者ID:AlexSnet,项目名称:webtrees,代码行数:28,代码来源:Stats.php

示例2: formatPageViews

 /**
  * Add markup to the hit counter.
  *
  * @param int $count
  *
  * @return string
  */
 protected function formatPageViews($count)
 {
     if ($count > 0) {
         return '<div class="page-views">' . I18N::plural('This page has been viewed %s time.', 'This page has been viewed %s times.', $count, '<span class="odometer">' . I18N::digits($count) . '</span>') . '</div>';
     } else {
         return '';
     }
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:15,代码来源:AbstractTheme.php

示例3:

		<div id="pgv-import-wizard" class="panel-collapse collapse">
			<div class="panel-body">
				<p>
					<?php 
    echo I18N::translate('The PhpGedView to webtrees wizard is an automated process to assist administrators make the move from a PhpGedView installation to a new webtrees one.  It will transfer all PhpGedView GEDCOM and other database information directly to your new webtrees database.  The following requirements are necessary:');
    ?>
				</p>
				<ul>
					<li>
						<?php 
    echo I18N::translate('webtrees’ database must be on the same server as PhpGedView’s');
    ?>
					</li>
					<li>
						<?php 
    echo I18N::translate('PhpGedView must be version 4.2.3, or any SVN up to #%s', I18N::digits(7101));
    ?>
					</li>
					<li>
						<?php 
    echo I18N::translate('All changes in PhpGedView must be accepted');
    ?>
					</li>
					<li>
						<?php 
    echo I18N::translate('All existing PhpGedView users must have distinct email addresses');
    ?>
					</li>
				</ul>
				<p>
					<?php 
开发者ID:AlexSnet,项目名称:webtrees,代码行数:31,代码来源:admin_trees_manage.php

示例4: formatLongYear

 /**
  * Generate the %Y format for a date.
  *
  * @return string
  */
 protected function formatLongYear()
 {
     return I18N::digits($this->y);
 }
开发者ID:AlexSnet,项目名称:webtrees,代码行数:9,代码来源:CalendarDate.php

示例5: formatTimestamp

 /**
  * Convert a unix timestamp into a formatted date-time value, for logs, etc.
  * Don't attempt to convert into other calendars, as not all days start at
  * midnight, and we can only get it wrong.
  *
  * @param int $time
  *
  * @return string
  */
 public static function formatTimestamp($time)
 {
     $time_fmt = I18N::timeFormat();
     // PHP::date() doesn't do I18N. Do it ourselves....
     preg_match_all('/%[^%]/', $time_fmt, $matches);
     foreach ($matches[0] as $match) {
         switch ($match) {
             case '%a':
                 $t = gmdate('His', $time);
                 if ($t == '000000') {
                     $time_fmt = str_replace($match, I18N::translate('midnight'), $time_fmt);
                 } elseif ($t < '120000') {
                     $time_fmt = str_replace($match, I18N::translate('a.m.'), $time_fmt);
                 } elseif ($t == '120000') {
                     $time_fmt = str_replace($match, I18N::translate('noon'), $time_fmt);
                 } else {
                     $time_fmt = str_replace($match, I18N::translate('p.m.'), $time_fmt);
                 }
                 break;
             case '%A':
                 $t = gmdate('His', $time);
                 if ($t == '000000') {
                     $time_fmt = str_replace($match, I18N::translate('Midnight'), $time_fmt);
                 } elseif ($t < '120000') {
                     $time_fmt = str_replace($match, I18N::translate('A.M.'), $time_fmt);
                 } elseif ($t == '120000') {
                     $time_fmt = str_replace($match, I18N::translate('Noon'), $time_fmt);
                 } else {
                     $time_fmt = str_replace($match, I18N::translate('P.M.'), $time_fmt);
                 }
                 break;
             default:
                 $time_fmt = str_replace($match, I18N::digits(gmdate(substr($match, -1), $time)), $time_fmt);
         }
     }
     return self::timestampToGedcomDate($time)->display() . '<span class="date"> - ' . $time_fmt . '</span>';
 }
开发者ID:tronsmit,项目名称:webtrees,代码行数:46,代码来源:FunctionsDate.php

示例6: formatLongYear

 /**
  * Generate the %Y format for a date.
  *
  * @return string
  */
 protected function formatLongYear()
 {
     if ($this->y < 0) {
         return I18N::translate('%s&nbsp;BCE', I18N::digits(-$this->y));
     } else {
         if ($this->new_old_style) {
             return I18N::translate('%s&nbsp;CE', I18N::digits(sprintf('%d/%02d', $this->y - 1, $this->y % 100)));
         } else {
             return I18N::translate('%s&nbsp;CE', I18N::digits($this->y));
         }
     }
 }
开发者ID:tunandras,项目名称:webtrees,代码行数:17,代码来源:JulianDate.php

示例7: statusHide

        echo " onclick=\"statusDisable('z-axis-boundaries-periods');";
        echo '"><label for="z_none">', I18N::translate('overall'), '</label><br>';
        echo '<input type="radio" id="z_sex" name="z-as" value="301" ';
        echo " onclick=\"statusDisable('z-axis-boundaries-periods');";
        echo '"><label for="z_sex">', I18N::translate('gender'), '</label><br>';
        echo '<input type="radio" id="z_time" name="z-as" value="302" checked';
        echo " onclick=\"statusEnable('z-axis-boundaries-periods');";
        echo '"><label for="z_time">', I18N::translate('date periods'), '</label><br><br>';
        echo I18N::translate('Date range'), '<br>';
        echo '<select id="z-axis-boundaries-periods" name="z-axis-boundaries-periods">
				<option value="1700,1750,1800,1850,1900,1950,2000" selected>', I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 50, I18N::digits(1700), I18N::number(50)), '</option>
				<option value="1800,1840,1880,1920,1950,1970,2000">', I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 40, I18N::digits(1800), I18N::number(40)), '</option>
				<option value="1800,1850,1900,1950,2000">', I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 50, I18N::digits(1800), I18N::number(50)), '</option>
				<option value="1900,1920,1940,1960,1980,1990,2000">', I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 20, I18N::digits(1900), I18N::number(20)), '</option>
				<option value="1900,1925,1950,1975,2000">', I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 25, I18N::digits(1900), I18N::number(25)), '</option>
				<option value="1940,1950,1960,1970,1980,1990,2000">', I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 10, I18N::digits(1940), I18N::number(10)), '</option>
			</select>
			<br><br>';
        echo I18N::translate('Results'), '<br>';
        echo '<input type="radio" id="y_num" name="y-as" value="201" checked';
        echo '><label for="y_num">', I18N::translate('numbers'), '</label><br>';
        echo '<input type="radio" id="y_perc" name="y-as" value="202" ';
        echo '><label for="y_perc">', I18N::translate('percentage'), '</label><br>';
        echo '</td>
			</tr>
			</table>
			<table width="100%">
			<tr align="center"><td>
				<br>
				<input type="submit" value="', I18N::translate('show the plot'), ' ">
				<input type="reset"  value=" ', I18N::translate('reset'), ' " onclick="{statusEnable(\'z_sex\'); statusHide(\'x_years\'); statusHide(\'x_months\'); statusHide(\'x_numbers\'); statusHide(\'map_opt\');}"><br>
开发者ID:tunandras,项目名称:webtrees,代码行数:31,代码来源:statistics.php

示例8:

        echo I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 50, I18N::digits(1800), I18N::number(50));
        ?>
									</option>
									<option value="1900,1920,1940,1960,1980,1990,2000">
										<?php 
        echo I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 20, I18N::digits(1900), I18N::number(20));
        ?>
									</option>
									<option value="1900,1925,1950,1975,2000">
										<?php 
        echo I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 25, I18N::digits(1900), I18N::number(25));
        ?>
									</option>
									<option value="1940,1950,1960,1970,1980,1990,2000">
										<?php 
        echo I18N::plural('from %1$s interval %2$s year', 'from %1$s interval %2$s years', 10, I18N::digits(1940), I18N::number(10));
        ?>
									</option>
								</select>
								<br>
								<br>
								<?php 
        echo I18N::translate('Results');
        ?>
								<br>
								<label>
									<input type="radio" name="y-as" value="201" checked>
									<?php 
        echo I18N::translate('numbers');
        ?>
								</label>
开发者ID:tronsmit,项目名称:webtrees,代码行数:31,代码来源:statistics.php


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