⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lang.pl.php

📁 java开源项目源代码
💻 PHP
📖 第 1 页 / 共 2 页
字号:
        return $this->_sep . $this->_digits[0];      }          $h = $t = $d = 0;            switch(strlen($num)) {        case 3:          $h = (int)substr($num,-3,1);        case 2:          $t = (int)substr($num,-2,1);        case 1:          $d = (int)substr($num,-1,1);          break;        case 0:          return;          break;      }      switch ($h) {      case 9:          $ret .= $this->_sep . 'dziewi赕set';          break;      case 8:          $ret .= $this->_sep . 'osiemset';          break;      case 7:          $ret .= $this->_sep . 'siedemset';          break;      case 6:          $ret .= $this->_sep . 'sze舵set';          break;      case 5:          $ret .= $this->_sep . 'pi赕set';          break;      case 4:          $ret .= $this->_sep . 'czterysta';          break;      case 3:          $ret .= $this->_sep . 'trzysta';          break;      case 2:          $ret .= $this->_sep . 'dwie禼ie';          break;      case 1:          $ret .= $this->_sep . 'sto';          break;      }      switch ($t) {      case 9:      case 8:      case 7:      case 6:      case 5:          $ret .= $this->_sep . $this->_digits[$t] . 'dziesi眛';          break;      case 4:          $ret .= $this->_sep . 'czterdzie禼i';          break;      case 3:          $ret .= $this->_sep . 'trzydzie禼i';          break;      case 2:          $ret .= $this->_sep . 'dwadzie禼ia';          break;      case 1:          switch ($d) {          case 0:              $ret .= $this->_sep . 'dziesi赕';              break;          case 1:              $ret .= $this->_sep . 'jedena禼ie';              break;          case 2:          case 3:          case 7:          case 8:              $ret .= $this->_sep . $this->_digits[$d] . 'na禼ie';              break;          case 4:              $ret .= $this->_sep . 'czterna禼ie';              break;          case 5:              $ret .= $this->_sep . 'pi阾na禼ie';              break;          case 6:              $ret .= $this->_sep . 'szesna禼ie';              break;          case 9:              $ret .= $this->_sep . 'dziewi阾na禼ie';              break;          }          break;       }      if ($t != 1 && $d > 0)        $ret .= $this->_sep . $this->_digits[$d];        if ($t == 1)        $d = 0;      if (( $h + $t ) > 0 && $d == 1)        $d = 0;      if ($power > 0) {        if (isset($this->_exponent[$power]))          $lev = $this->_exponent[$power];        if (!isset($lev) || !is_array($lev))          return null;         switch ($d) {          case 1:            $suf = $lev[0];            break;          case 2:          case 3:          case 4:            $suf = $lev[1];            break;          case 0:          case 5:          case 6:          case 7:          case 8:          case 9:            $suf = $lev[2];            break;        }        $ret .= $this->_sep . $suf;      }        if ($powsuffix != '')        $ret .= $this->_sep . $powsuffix;      return $ret;    }    // }}}    // {{{ toCurrencyWords()    /**     * Converts a currency value to its word representation     * (with monetary units) in Polish language     *     * @param  integer $int_curr An international currency symbol     *                 as defined by the ISO 4217 standard (three characters)     * @param  integer $decimal A money total amount without fraction part (e.g. amount of dollars)     * @param  integer $fraction Fractional part of the money amount (e.g. amount of cents)     *                 Optional. Defaults to false.     * @param  integer $convert_fraction Convert fraction to words (left as numeric if set to false).     *                 Optional. Defaults to true.     *     * @return string  The corresponding word representation for the currency     *     * @access public     * @author Piotr Klaban <makler@man.torun.pl>     * @since  Numbers_Words 0.4     */    function toCurrencyWords($int_curr, $decimal, $fraction = false, $convert_fraction = true) {        $int_curr = strtoupper($int_curr);        if (!isset($this->_currency_names[$int_curr])) {            $int_curr = $this->def_currency;        }        $curr_names = $this->_currency_names[$int_curr];        $ret  = trim($this->toWords($decimal));        $lev  = $this->_get_numlevel($decimal);        $ret .= $this->_sep . $curr_names[0][$lev];              if ($fraction !== false) {            if ($convert_fraction) {                $ret .= $this->_sep . trim($this->toWords($fraction));            } else {                $ret .= $this->_sep . $fraction;            }            $lev  = $this->_get_numlevel($fraction);                $ret .= $this->_sep . $curr_names[1][$lev];        }        return $ret;    }    // }}}    // {{{ _get_numlevel()        /**     * Returns grammatical "level" of the number - this is necessary     * for choosing the right suffix for exponents and currency names.     *     * @param  integer $num   An integer between -infinity and infinity inclusive     *                        that need to be converted to words     *     * @return integer  The grammatical "level" of the number.     *     * @access private     * @author Piotr Klaban <makler@man.torun.pl>     * @since  Numbers_Words 0.4     */    function _get_numlevel($num) {        $num = (int)substr($num,-3);        $h = $t = $d = $lev = 0;                switch(strlen($num)) {            case 3:                $h = (int)substr($num,-3,1);            case 2:                $t = (int)substr($num,-2,1);            case 1:                $d = (int)substr($num,-1,1);                break;            case 0:                return $lev;                break;        }        if ($t == 1)            $d = 0;        if (( $h + $t ) > 0 && $d == 1)            $d = 0;        switch ($d) {            case 1:                $lev = 0;                break;            case 2:            case 3:            case 4:                $lev = 1;                break;            default:                $lev = 2;        }        return $lev;    }    // }}}}?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -