• Модуль: fileman
  • Путь к файлу: ~/bitrix/modules/fileman/classes/general/spellchecker.php
  • Класс: CSpellchecker
  • Вызов: CSpellchecker::__construct
public function __construct($params)
{
	$this->lang = (isset($params["lang"]) && $params["lang"] != '') ? $params["lang"] : 'en';
	$this->skip_len = $params["skip_length"];

	$this->pspell = (function_exists('pspell_config_create') && ($params["use_pspell"] == "Y"));
	//$this->custom_spell = $params["use_custom_spell"] == "Y";
	$this->custom_spell = false;
	$this->pspell_mode = $params["mode"];

	$this->dics_path = $this->checkDicPath();
	$this->user_dics_path = $this->dics_path."/custom.pws";
	$this->custom_dics_path = $this->dics_path.'/custom_dics/'.$this->lang.'_';

	if($this->custom_spell)
	{
		$this->dic = array();
	}

	if ($this->pspell)
	{
		$pspell_config = pspell_config_create ($this->lang, null, null, 'utf-8');
		pspell_config_ignore($pspell_config, $this->skip_len);
		pspell_config_mode($pspell_config, $params["mode"]);
		pspell_config_personal($pspell_config, $this->user_dics_path);
		$this->pspell_link = pspell_new_config($pspell_config);
	}
}