use Bitrix\Main\Localization\Loc; Loc::loadMessages(__DIR__ . '/lang/en.php');
echo Loc::getMessage('MY_COMPONENT_MESSAGE');This would output the value of the MY_COMPONENT_MESSAGE key in the loaded language file. Overall, the bitrix.main.localization package provides essential localization functionality for developers working with Bitrix.