1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
localize.php
См. документацию.
1
<?php
2
namespace
Bitrix\Im\Integration\Imopenlines;
3
4
class
Localize
5
{
6
static
$MESS
= Array();
7
8
const
FILE_LIB_CHAT
=
'FILE_LIB_CHAT'
;
9
10
private
static
function
resolveType(
$type
)
11
{
12
$types = Array(
13
'FILE_LIB_CHAT'
=>
'/bitrix/modules/imopenlines/lib/chat.php'
,
14
);
15
16
return
isset($types[
$type
])? $types[
$type
]:
false
;
17
}
18
19
public
static
function
get
(
$type
, $phraseCode =
null
,
$lang
=
null
)
20
{
21
$path
= self::resolveType(
$type
);
22
if
(!
$path
)
23
{
24
return
is_string($phraseCode)?
''
: Array();
25
}
26
27
if
(!is_string(
$lang
))
28
{
29
$lang
=
null
;
30
}
31
32
if
(!isset(self::$MESS[
$type
][
$lang
]))
33
{
34
self::$MESS[
$type
][
$lang
] =
\Bitrix\Main\Localization\Loc::loadLanguageFile
(
$_SERVER
[
'DOCUMENT_ROOT'
].
$path
,
$lang
);
35
}
36
37
if
(is_string($phraseCode))
38
{
39
return
isset(self::$MESS[
$type
][
$lang
][$phraseCode])? self::$MESS[
$type
][
$lang
][$phraseCode]:
''
;
40
}
41
else
42
{
43
return
isset(self::$MESS[
$type
][
$lang
])? self::$MESS[
$type
][
$lang
]: Array();
44
}
45
}
46
}
$path
$path
Определения
access_edit.php:21
$type
$type
Определения
options.php:106
Bitrix\Im\Integration\Imopenlines\Localize
Определения
localize.php:5
Bitrix\Im\Integration\Imopenlines\Localize\FILE_LIB_CHAT
const FILE_LIB_CHAT
Определения
localize.php:8
Bitrix\Im\Integration\Imopenlines\Localize\$MESS
static $MESS
Определения
localize.php:6
Bitrix\Main\Localization\Loc\loadLanguageFile
static loadLanguageFile($file, $language=null, $normalize=true)
Определения
loc.php:225
$_SERVER
$_SERVER["DOCUMENT_ROOT"]
Определения
cron_frame.php:9
$lang
if(!defined('SITE_ID')) $lang
Определения
include.php:91
bitrix
modules
im
lib
integration
imopenlines
localize.php
Создано системой
1.14.0