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


PHP Locale::getDisplayVariant方法代码示例

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


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

示例1: dispVariants

 /**
  * Returns the variants of a locale after localizing them in the default or some other locale.
  *
  * @param  CULocale $inLocale **OPTIONAL. Default is** *the application's default locale*. The locale in which the
  * variants are to be localized.
  *
  * @return CUStringObject The locale's localized variants, as a single string.
  */
 public function dispVariants(CULocale $inLocale = null)
 {
     $strInLocale = isset($inLocale) ? $inLocale->m_name : self::defaultLocaleName();
     return Locale::getDisplayVariant($this->m_name, $strInLocale);
 }
开发者ID:nunodotferreira,项目名称:Phred,代码行数:13,代码来源:CULocale.php

示例2: getDisplayVariant

 /**
  * Returns an appropriately localized display name for variants of the locale
  *
  * @param  string $inLocale Optional format locale to use to display the variant name
  * @return string           Name of the variant in the format appropriate for $inLocale
  */
 public function getDisplayVariant($inLocale = '')
 {
     if (!$inLocale) {
         $inLocale = $this->getLocale();
     }
     return IntlLocale::getDisplayVariant($this->getLocale(), $inLocale);
 }
开发者ID:ledgr,项目名称:localefacade,代码行数:13,代码来源:LocaleFacade.php

示例3: getDisplayVariant

 /**
  * Returns detailed informations from the variant table
  * If no detail is given a complete table is returned
  *
  * @param string  $locale Normalized locale
  * @param boolean $invert Invert output of the data
  * @param string|array $detail Detail to return information for
  * @return array
  */
 public static function getDisplayVariant($locale, $invert = false, $detail = null)
 {
     if ($detail !== null) {
         return Locale::getDisplayVariant($locale);
     } else {
         $list = ZFLocale::getLocaleList();
         foreach ($list as $key => $value) {
             $list[$key] = Locale::getDisplayVariant($key);
         }
         if ($invert) {
             array_flip($list);
         }
         return $list;
     }
 }
开发者ID:bradley-holt,项目名称:zf2,代码行数:24,代码来源:Intl.php

示例4: getDisplayVariant

 /**
  * Returns a name for the locale's variant code that is appropriate for display to the user.
  *
  * @param Locale|null $inLocale
  *
  * @return string
  */
 public function getDisplayVariant(Locale $inLocale = null)
 {
     return \Locale::getDisplayVariant($this->locale, $inLocale ? $inLocale->locale : null);
 }
开发者ID:brick,项目名称:brick,代码行数:11,代码来源:Locale.php


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