1: <?php
2: /**
3: * Xoops Localization function
4: *
5: * You may not change or alter any portion of this comment or credits
6: * of supporting developers from this source code or any supporting source code
7: * which is considered copyrighted (c) material of the original comment or credit authors.
8: * This program is distributed in the hope that it will be useful,
9: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11: *
12: * @copyright (c) 2000-2016 XOOPS Project (www.xoops.org)
13: * @license GNU GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html)
14: * @package core
15: * @since 2.3.0
16: * @author Taiwen Jiang <phppp@users.sourceforge.net>
17: */
18: defined('XOOPS_ROOT_PATH') || exit('Restricted access');
19:
20: /**
21: * XoopsLocalWrapper
22: *
23: */
24: class XoopsLocalWrapper
25: {
26: /**
27: * @param null $language
28: *
29: * @return bool
30: */
31: public static function load($language = null)
32: {
33: if (class_exists('Xoopslocal')) {
34: return true;
35: }
36: require_once $GLOBALS['xoops']->path('class/xoopslocal.php');
37: //XoopsLocal is inside language file, let us load it
38: xoops_loadLanguage('locale');
39:
40: return true;
41: }
42: }
43:
44: /**
45: * Enter description here...
46: *
47: * @return mixed
48: */
49: function xoops_local()
50: {
51: // get parameters
52: $func_args = func_get_args();
53: $func = array_shift($func_args);
54:
55: // local method defined
56: return call_user_func_array(array(
57: 'XoopsLocal',
58: $func), $func_args);
59: }
60:
61: XoopsLocalWrapper::load();
62: