XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
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 
23 defined('XOOPS_ROOT_PATH') or die('Restricted access');
24 
25 setlocale(LC_ALL, 'en_US');
26 
27 // !!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"
28 // insert double '\' before 't','r','n'
29 define("_TODAY","\T\o\d\a\y G:i");
30 define("_YESTERDAY","\Y\e\s\\t\e\\r\d\a\y G:i");
31 define("_MONTHDAY","n/j G:i");
32 define("_YEARMONTHDAY","Y/n/j G:i");
33 define("_ELAPSE","%s ago");
34 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>.");
35 
46 {
53  function number_format($number)
54  {
55  return number_format($number, 2, '.',',');
56  }
57 
65  function money_format($format, $number)
66  {
67  setlocale(LC_MONETARY, 'en_US');
68  return money_format($format, $number);
69  }
70 }