XOOPS  2.6.0
_locale.php
Go to the documentation of this file.
1 <?php
2 /*
3  You may not change or alter any portion of this comment or credits
4  of supporting developers from this source code or any supporting source code
5  which is considered copyrighted (c) material of the original comment or credit authors.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 */
11 
24 setlocale(LC_ALL, 'en_US');
25 
26 // !!IMPORTANT!! insert '\' before any char among reserved chars: "a", "A", "B", "c", "d", "D", "F", "g", "G", "h", "H", "i", "I", "j", "l", "L", "m", "M", "n", "O", "r", "s", "S", "t", "T", "U", "w", "W", "Y", "y", "z", "Z"
27 // insert double '\' before 't', 'r', 'n'
28 define("_TODAY", "\T\o\d\a\y G:i");
29 define("_YESTERDAY", "\Y\e\s\\t\e\\r\d\a\y G:i");
30 define("_MONTHDAY", "n/j G:i");
31 define("_YEARMONTHDAY", "Y/n/j G:i");
32 define("_ELAPSE", "%s ago");
33 define("_TIMEFORMAT_DESC", "Valid formats: \"s\" - " . _SHORTDATESTRING . "; \"m\" - " . _MEDIUMDATESTRING . "; \"l\" - " . _DATESTRING . ";<br />" . "\"c\" or \"custom\" - format determined according to interval to present; \"e\" - Elapsed; \"mysql\" - Y-m-d H:i:s;<br />" . "specified string - Refer to <a href=\"http://php.net/manual/en/function.date.php\" rel=\"external\">PHP manual</a>.");
34 define("_TIMEZONE_SET", "Europe/London");
35 
45 class XoopsLocal extends XoopsLocalAbstract
46 {
53  static function number_format($number)
54  {
55  return number_format($number, 2, '.', ',');
56  }
57 
65  static function money_format($format, $number)
66  {
67  setlocale(LC_MONETARY, 'en_US');
68  return money_format($format, $number);
69  }
70 }
static money_format($format, $number)
Definition: _locale.php:65
static number_format($number)
Definition: _locale.php:53