Aleksander Machniak
2016-05-22 77b5d7ee304a688a2eb115ce04b460b43c0dd700
program/lib/Roundcube/rcube_spellcheck_enchant.php
@@ -1,6 +1,6 @@
<?php
/*
/**
 +-----------------------------------------------------------------------+
 | This file is part of the Roundcube Webmail client                     |
 |                                                                       |
@@ -29,6 +29,25 @@
    private $enchant_broker;
    private $enchant_dictionary;
    private $matches = array();
    /**
     * Return a list of languages supported by this backend
     *
     * @see rcube_spellcheck_engine::languages()
     */
    function languages()
    {
        $this->init();
        $langs = array();
        if ($dicts = enchant_broker_list_dicts($this->enchant_broker)) {
            foreach ($dicts as $dict) {
                $langs[] = preg_replace('/-.*$/', '', $dict['lang_tag']);
            }
        }
        return array_unique($langs);
    }
    /**
     * Initializes Enchant dictionary
@@ -159,6 +178,4 @@
        return $result;
    }
}