Beispiel #1
0
	public static function GetFormatTemplates()
	{
		$installCurrencies = CCurrency::getInstalledCurrencies();
		$templates = array();
		$templates[] = array(
			'TEXT' => '$1.234,10',
			'FORMAT' => '$#',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_DOT,
			'DECIMALS' => '2'
		);
		$templates[] = array(
			'TEXT' => '$1 234,10',
			'FORMAT' => '$#',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_SPACE,
			'DECIMALS' => '2'
		);
		$templates[] = array(
			'TEXT' => '1.234,10 USD',
			'FORMAT' => '# USD',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_DOT,
			'DECIMALS' => '2'
		);
		$templates[] = array(
			'TEXT' => '1 234,10 USD',
			'FORMAT' => '# USD',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_SPACE,
			'DECIMALS' => '2'
		);
		$templates[] = array(
			'TEXT' => '€2.345,20',
			'FORMAT' => '€#',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_DOT,
			'DECIMALS' => '2'
		);
		$templates[] = array(
			'TEXT' => '€2 345,20',
			'FORMAT' => '€#',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_SPACE,
			'DECIMALS' => '2'
		);
		$templates[] = array(
			'TEXT' => '2.345,20 EUR',
			'FORMAT' => '# EUR',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_DOT,
			'DECIMALS' => '2'
		);
		$templates[] = array(
			'TEXT' => '2 345,20 EUR',
			'FORMAT' => '# EUR',
			'DEC_POINT' => ',',
			'THOUSANDS_VARIANT' => self::SEP_SPACE,
			'DECIMALS' => '2'
		);

		if (in_array('RUB', $installCurrencies))
		{
			$rubTitle = Loc::getMessage('BT_CUR_LANG_CURRENCY_RUBLE');
			$templates[] = array(
				'TEXT' => '3.456,70 '.$rubTitle,
				'FORMAT' => '# '.$rubTitle,
				'DEC_POINT' => ',',
				'THOUSANDS_VARIANT' => self::SEP_DOT,
				'DECIMALS' => '2'
			);
			$templates[] = array(
				'TEXT' => '3 456,70 '.$rubTitle,
				'FORMAT' => '# '.$rubTitle,
				'DEC_POINT' => ',',
				'THOUSANDS_VARIANT' => self::SEP_SPACE,
				'DECIMALS' => '2'
			);
		}
		return $templates;
	}