Documentation

Localization


Small-scale service designed to provide a convenient access to general localization language phrases.

Usually, repeating language phrases have to be duplicated in each location of use.

This service was designed to avoid duplicates as well.


Methods


Method Description Available from version
public function loadMessages(): array
Loads general localization phrases (located at the path crm/lang/{LANGUAGE_ID}/lib/Service/Localization.php) and returns them.
public function loadKanbanMessages(): array
Loads localization phraases for kanban (located at the path crm/lang/{LANGUAGE_ID}/kanban.php) and returns them.

Example

use Bitrix\Crm\Service;

Service\Container::getInstance()->getLocalization()->loadMessages();

$title = \Bitrix\Main\Localization\Loc::getMessage('CRM_TYPE_TYPE_SETTINGS');


© «Bitrix24», 2001-2022
Up