Documentation

Loc

Loc final class for handling language files.

Similar classes in the old core: GetMessage, IncludeModuleLangFile, IncludeTemplateLangFile.

Method Description Available from version
getDefaultLang Returns default replacement language for other languages.
getMessage Returns message by ID on the current language.
loadCustomMessages Load customizad phrases from file to rewrite message by their IDs
loadLanguageFile Returns language messages from specified file.
loadMessages Loads language messages for a specified file.

Example

Requesting language files and variables:

use Bitrix\Main\Localization\Loc;

Loc::loadMessages(__FILE__);
echo Loc::getMessage("EEEEEE_TIPS.TITLE");


© «Bitrix24», 2001-2024
Up