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


PHP Lang::_transliterations方法代码示例

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


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

示例1: __load

 private function __load($path, $lang, $clear = false)
 {
     if ((bool) $clear === true || !self::$_dictionary instanceof Dictionary) {
         self::$_dictionary = new Dictionary(array());
         self::$_transliterations = array();
     }
     $include = sprintf($path, $lang);
     if (file_exists($include)) {
         require $include;
     }
     if (is_array($dictionary)) {
         self::$_dictionary->merge($dictionary);
     }
     if (is_array($transliterations)) {
         self::$_transliterations = array_merge(self::$_transliterations, $transliterations);
     }
     if (empty(self::$_transliterations)) {
         include TOOLKIT . '/include.transliterations.php';
         self::$_transliterations = $transliterations;
     }
 }
开发者ID:njmcgee,项目名称:taxcheck,代码行数:21,代码来源:class.lang.php

示例2: load

 /**
  * Load language file. Each language file contains three arrays:
  * about, dictionary and transliterations.
  *
  * @param string $path
  *	Path of the language file that should be loaded
  * @param boolean $clear
  *	True, if the current dictionary should be cleared, defaults to false
  */
 public static function load($path, $clear = false)
 {
     // Initialize or clear dictionary
     if (!self::$_dictionary instanceof Dictionary || $clear === true) {
         self::initialize();
     }
     // Load language file
     if (file_exists($path)) {
         require $path;
     }
     // Define default dates
     if (empty(self::$_dates)) {
         $dates = array('yesterday', 'today', 'tomorrow', 'now', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'sec', 'second', 'min', 'minute', 'hour', 'day', 'fortnight', 'forthnight', 'month', 'year', 'secs', 'seconds', 'mins', 'minutes', 'hours', 'days', 'fortnights', 'forthnights', 'months', 'years', 'weekday', 'weekdays', 'week', 'weeks', 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eighth', 'ninth', 'tenth', 'eleventh', 'twelfth', 'next', 'last', 'previous', 'this');
         foreach ($dates as $date) {
             self::$_dates[$date] = $date;
         }
     }
     // Merge dictionaries
     if (isset($dictionary) && is_array($dictionary)) {
         self::$_dictionary->merge($dictionary);
         // Add date translations
         foreach (self::$_dates as $key => $value) {
             self::$_dates[$key] = __($key);
         }
     }
     // Populate transliterations
     if (isset($transliterations) && is_array($transliterations)) {
         self::$_transliterations = array_merge(self::$_transliterations, $transliterations);
     }
     // Use default if no transliterations are provided with the translations
     if (empty(self::$_transliterations)) {
         include LANG . '/lang.en.php';
         self::$_transliterations = $transliterations;
     }
 }
开发者ID:scottkf,项目名称:keepflippin--on-symphony,代码行数:44,代码来源:class.lang.php

示例3: clear

 /**
  * Clear the current dictionary and transliteration arrays
  */
 public static function clear()
 {
     self::$_dictionary = new Dictionary(array());
     self::$_transliterations = array();
 }
开发者ID:klaftertief,项目名称:sym-forum,代码行数:8,代码来源:class.lang.php

示例4: load

 /**
  * Load language file. Each language file contains three arrays:
  * about, dictionary and transliterations.
  *
  * @param string $path
  *  Path of the language file that should be loaded
  */
 private static function load($path)
 {
     // Load language file
     if (file_exists($path)) {
         require $path;
     }
     // Populate dictionary ($dictionary is declared inside $path)
     if (isset($dictionary) && is_array($dictionary)) {
         self::$_dictionary = array_merge(self::$_dictionary, $dictionary);
     }
     // Populate transliterations ($transliterations is declared inside $path)
     if (isset($transliterations) && is_array($transliterations)) {
         self::$_transliterations = array_merge(self::$_transliterations, $transliterations);
     }
 }
开发者ID:nickdunn,项目名称:elasticsearch-surfin-shakespeare,代码行数:22,代码来源:class.lang.php


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