1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Loc

Открытые статические члены

static getMessage ($code, $replace=null, $language=null)
static loadMessages ($file)
static getCurrentLang ()
static setCurrentLang ($language)
static loadLanguageFile ($file, $language=null, $normalize=true)
static loadCustomMessages ($file, $language=null)
static getDefaultLang ($lang)
static getIncludedFiles ()
static getMessagePlural (string $code, int $value, ?array $replace=null, ?string $language=null)
static getPluralForm ($value, $language=null)

Подробное описание

Примеры
C:/bitrix/modules/main/lib/ui/copyright.php.

См. определение в файле loc.php строка 11

Методы

◆ getCurrentLang()

getCurrentLang ( )
static
Возвращает
string

См. определение в файле loc.php строка 79

◆ getDefaultLang()

getDefaultLang ( $lang)
static

Returns default language for specified language. Default language is used when translation is not found.

Аргументы
string$lang
Возвращает
string

См. определение в файле loc.php строка 463

◆ getIncludedFiles()

getIncludedFiles ( )
static

Returns previously included lang files.

Возвращает
array

См. определение в файле loc.php строка 484

◆ getMessage()

getMessage ( $code,
$replace = null,
$language = null )
static

Returns translation by message code. Loc::loadMessages(FILE) should be called first once per php file

Аргументы
string$code
array$replacee.g. array("#NUM#"=>5)
string$language
Возвращает
string|null

См. определение в файле loc.php строка 30

◆ getMessagePlural()

getMessagePlural ( string $code,
int $value,
?array $replace = null,
?string $language = null )
static

Returns plural message by message code and number.

Аргументы
string$code
int$value
array | null$replacee.g. array("#NUM#"=>5)
string | null$language
Возвращает
string|null

См. определение в файле loc.php строка 498

◆ getPluralForm()

getPluralForm ( $value,
$language = null )
static

Return language plural form id by number

См. также
http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html
Аргументы
int$value
string  |  null$language
Возвращает
int

См. определение в файле loc.php строка 516

◆ loadCustomMessages()

loadCustomMessages ( $file,
$language = null )
static

Loads custom messages from the file to overwrite messages by their IDs.

Аргументы
string$file
string | null$language

См. определение в файле loc.php строка 286

◆ loadLanguageFile()

loadLanguageFile ( $file,
$language = null,
$normalize = true )
static

Loads language messages for specified file

Аргументы
string$file
string$language
bool$normalize
Возвращает
array

См. определение в файле loc.php строка 225

◆ loadMessages()

loadMessages ( $file)
static

Loads language messages for specified file in a lazy way

Аргументы
string$file

См. определение в файле loc.php строка 65

◆ setCurrentLang()

setCurrentLang ( $language)
static

См. определение в файле loc.php строка 96


Объявления и описания членов класса находятся в файле:
  • C:/bitrix/modules/main/lib/localization/loc.php