3 You may not change or alter any portion of this comment or credits
\r
4 of supporting developers from this source code or any supporting source code
\r
5 which is considered copyrighted (c) material of the original comment or credit authors.
\r
7 This program is distributed in the hope that it will be useful,
\r
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\r
15 * @copyright The XOOPS project http://sourceforge.net/projects/xoops/
\r
16 * @license http://www.fsf.org/copyleft/gpl.html GNU public license
\r
19 * @author Taiwen Jiang <phppp@users.sourceforge.net>
\r
20 * @version $Id: locale.php 1530 2008-05-01 09:22:47Z phppp $
\r
21 * @todo To be handled by i18n/l10n
\r
24 setlocale(LC_ALL, 'en_US');
\r
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"
\r
27 // insert double '\' before 't', 'r', 'n'
\r
28 define("_TODAY", "\T\o\d\a\y G:i");
\r
29 define("_YESTERDAY", "\Y\e\s\\t\e\\r\d\a\y G:i");
\r
30 define("_MONTHDAY", "n/j G:i");
\r
31 define("_YEARMONTHDAY", "Y/n/j G:i");
\r
33 define("_ELAPSE", "%s ago");
\r
35 define("_TIMEFORMAT_DESC", "Valid formats: \"s\" - " . _SHORTDATESTRING . "; \"m\" - " . _MEDIUMDATESTRING . "; \"l\" - " . _DATESTRING . ";<br />".
\r
36 "\"c\" or \"custom\" - format determined according to interval to present; \"e\" - Elapsed; \"mysql\" - Y-m-d H:i:s;<br />".
\r
37 "specified string - Refer to <a href=\"http://php.net/manual/en/function.date.php\" rel=\"external\">PHP manual</a>."
\r
40 class XoopsLocal extends XoopsLocalAbstract
\r
43 function number_format($number)
\r
45 return number_format($number, 2, '.', ',');
\r
48 function money_format($format, $number)
\r
50 setlocale(LC_MONETARY, 'en_US');
\r
51 return money_format($format, $number);
\r