Return number as text.

@param string $number Number for processing
@param string $langCode Languge code in format `ISO 639-1` or `ISO 639-2`
@return string|bool Return number as text, or False on failure.
779008
public function numberText($number = null, $langCode = null) {
		if (!is_object($this->_NumberTextLib)) {
			return false;
		}
		$langNumb = $this->_getLangForNumberText($langCode);

		return $this->_NumberTextLib->numberText($number, $langNumb);
	}
823824
public static function code($code = 200) : String
    {
        $messages = Datatype::multikey(self::$messages);

        if( isset($messages[$code]) )
        {
            return $messages[$code];
        }

        return false;
    }
632275
public function set($langcode, $context)
    {
        $result = null;
        $this->hook->attach('translation.set.before', $langcode, $context, $result, $this);

        if (isset($result)) {
            return $result;
        }

        $this->setContext($context);
        $this->setLangcode($langcode);

        $result = $this->prepareFiles($langcode);

        $this->hook->attach('translation.set.after', $langcode, $context, $result, $this);
        return (bool) $result;
    }
975322
protected function getNumberFormat($locale)
    {
        if (!isset($this->numberFormats[$locale])) {
            $this->numberFormats[$locale] = $this->numberFormatRepository->get($locale);
        }

        return $this->numberFormats[$locale];
    }
252644
public static function ordinal($number)
    {
        $test_c = abs($number) % 10;
        $ext = ((abs($number) % 100 < 21 && abs($number) % 100 > 4) ? 'th' : (($test_c < 4) ? ($test_c < 3) ? ($test_c < 2) ? ($test_c < 1) ? 'th' : 'st' : 'nd' : 'rd' : 'th'));

        return $number . $ext;
    }
319186
static public function getText( $code ){
		if( !array_key_exists( (int) $code, self::$codes ) )
			throw new InvalidArgumentException( 'Unknown HTTP status code: '.$code );
		return self::$codes[(int) $code];
	}
507485
public function getMessageText(Message $message, $langcode = '') {
    /** @var \Drupal\message\Entity\MessageTemplate $message_template */
    $message_template = $message->getTemplate();

    $message_arguments = $message->getArguments();
    $message_template_text = $message_template->get('text');

    // If we have a language code here we can try to get a translated text.
    if (!empty($langcode)) {
      $language_manager = \Drupal::languageManager();
      if ($language_manager instanceof ConfigurableLanguageManagerInterface) {
        // Load the language override for the message template.
        $config_translation = $language_manager->getLanguageConfigOverride($langcode, 'message.template.' . $message_template->id());
        $translated_text = $config_translation->get('text');

        // Replace the text *only* if we have an translation available.
        if ($translated_text) {
          $message_template_text = $translated_text;
        }
      }
    }

    $output = $this->processArguments($message_arguments, $message_template_text, $message);

    $token_options = $message_template->getSetting('token options', []);
    if (!empty($token_options['token replace'])) {
      // Token should be processed.
      $output = $this->processTokens($output, !empty($token_options['clear']), $message);
    }

    return $output;
  }
907498
public static function numberToChinese($number)
    {
        $chineseArr = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十'];
        $chineseStr = null;
        if ($number < 10) {
            $chineseStr = $chineseArr [$number - 1];
        } elseif ($number < 20) {
            $chineseStr = '十' . $chineseArr [$number - 11];
        } elseif ($number < 30) {
            $chineseStr = '二十' . $chineseArr [$number - 21];
        } else {
            $chineseStr = '三十' . $chineseArr [$number - 31];
        }
        return $chineseStr;
    }
1077726
public static function intToRoman(int $number): string
    {
        if ($number > 4999) {
            return (string) $number;
        }

        $romanNumber = '';
        foreach (static::$romanNumerals as $intNumeral => $romanNumeral) {
            $d = floor($number / $intNumeral);
            $romanNumber .= str_repeat($romanNumeral, $d);
            $number -= $d * $intNumeral;
        }

        return $romanNumber;
    }
634733
private function getAlphaNumber($number, $lowerCase = false)
    {
        $asciiStartIndex = $lowerCase ? 97 : 65;
        $alpha = '';
        while ($number > 0) {
            $modulus = ($number - 1) % 26;
            $alpha .= chr($modulus + $asciiStartIndex);
            $number = floor(($number - 1) / 26);
        }
        return strrev($alpha);
    }
22035
public static function numberToFromNativeLanguage($number, $options, $from = false) {
		if (!empty(self::$options['locale_override_class'])) {
			$locale_override_class = self::$options['locale_override_class'];
			if (!$from) {
				$number = $locale_override_class::amount($number . '', $options);
			} else {
				$number = $locale_override_class::readFloatval($number . '', $options);
			}
		}
		return $number;
	}
49853
public static function getText($code)
    {
        $code = (int) $code;

        if (!self::exists($code)) {
            throw new \DomainException('Http Code does not exist!');
        }

        return self::$httpCodes[$code];
	}
1319061
public function formatStandardNumber($number, $decimals = null)
    {
        $lang = $this->request->getSession()->getLang();

        if ($decimals === null) {
            $decimals = $lang->getDecimals();
        }

        return number_format($number, $decimals, '.', '');
    }
567569
protected function asString($number, $digits = 2) {
		$number = (string)$number;
		$count = mb_strlen($number);
		while ($count < $digits) {
			$number = '0' . $number;
			$count++;
		}
		return $number;
	}
412931
public function encode($number)
    {
        $number = (int)$number;

        $result = array();

        if (0 === $number)
        {
            $result[] = $this->dictionary[0];
        }

        while ($number > 0)
        {
            $result[] = $this->dictionary[($number % $this->radix)];
            $number = floor($number / $this->radix);
        }

        return implode('', array_reverse($result));
    }
1202525
public static function BigNumber($Number, $Format = '') {
      if (!is_numeric($Number))
         return $Number;
		
		$Negative = FALSE;
		$WorkingNumber = $Number;
		if ($Number < 0) {
			$Negative = TRUE;
			$WorkingNumber = $Number - ($Number * 2);
		}

      if ($WorkingNumber >= 1000000000) {
         $Number2 = $WorkingNumber / 1000000000;
         $Suffix = "B";
      } elseif ($WorkingNumber >= 1000000) {
         $Number2 = $WorkingNumber / 1000000;
         $Suffix = "M";
      } elseif ($WorkingNumber >= 1000) {
         $Number2 = $WorkingNumber / 1000;
         $Suffix = "K";
      } else
         $Number2 = $Number;
		
		if ($Negative)
			$Number2 = $Number2 - ($Number2 * 2);

      if (isset($Suffix)) {
         $Result = number_format($Number2, 1);
			if (substr($Result, -2) == '.0')
				$Result = substr($Result, 0, -2);
				
			$Result .= $Suffix;
      } else {
         $Result = $Number;
      }
      
      if ($Format == 'html')
         $Result = Wrap($Result, 'span', array('title' => number_format($Number)));
      
      return $Result;
   }
442418
public function parseString($number)
    {
        if (is_null($number)) {
            return '';
        }

        $matches = $this->execute($this->rawPhoneRegex, $number);

        if (sizeof($matches) > 0) {
            return $matches['numbers'];
        }

        return '';
    }