// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#include <config.h>
#include <sys/types.h>
#include <iconv.h>
Dictionary& dict = dictionaries[lang];
dict.set_language(get_language_def(lang));
+ if(charset != "")
+ dict.set_charset(charset);
for (SearchPath::iterator p = search_path.begin(); p != search_path.end(); ++p)
{
}
void
+DictionaryManager::set_charset(const std::string& charset)
+{
+ dictionaries.clear(); // changing charset invalidates cache
+ this->charset = charset;
+ set_language(language);
+}
+
+void
DictionaryManager::set_language_alias(const std::string& alias,
const std::string& language)
{
void
DictionaryManager::add_directory(const std::string& pathname)
{
+ dictionaries.clear(); // adding directories invalidates cache
search_path.push_back(pathname);
- // cache is outdated now
- dictionaries.clear();
set_language(language);
}