getMessage
string public static \Bitrix\Main\Localization\Loc::getMessage( string $code, array $replace = null, string $language = null );
Static method returns message by ID on the current language. Arrays of corresponding codes and messages are specified in language files. Before using this function, connect a corresponding language file ( Loc::loadMessages(__FILE__)).
Similar to the old core: GetMessage
Parameters
Parameter | Description | Version |
---|---|---|
$code | Message code. Code must be unique within the complete product. | |
$replace | Array of "template" => "replacement"pairs. It allows organising replacement by template. For example, array("#NUM#"=>5). | |
$language | Language ID. |
Example
© «Bitrix24», 2001-2024