diff -dPNur psi-0.14/src/libpsi/tools/spellchecker/aspellchecker.cpp psi-0.14-ds/src/libpsi/tools/spellchecker/aspellchecker.cpp
--- psi-0.14/src/libpsi/tools/spellchecker/aspellchecker.cpp	2009-12-02 22:43:43.000000000 +0100
+++ psi-0.14-ds/src/libpsi/tools/spellchecker/aspellchecker.cpp	2012-01-17 03:10:53.000000000 +0100
@@ -34,8 +34,6 @@
 
 ASpellChecker::ASpellChecker()
 {
-	config_ = NULL;
-	speller_ = NULL;
 	config_ = new_aspell_config();
 	aspell_config_replace(config_, "encoding", "utf-8");
 #ifdef Q_WS_WIN
@@ -43,15 +41,27 @@
 	aspell_config_replace(config_, "data-dir", QString("%1/aspell/data").arg(QCoreApplication::applicationDirPath()));
 	aspell_config_replace(config_, "dict-dir", QString("%1/aspell/dict").arg(QCoreApplication::applicationDirPath()));
 #endif
-	AspellCanHaveError* ret = new_aspell_speller(config_);
-	if (aspell_error_number(ret) == 0) {
-		speller_ = to_aspell_speller(ret);
+
+	const char* lang = aspell_config_retrieve(config_, "lang");
+	QList<QString> langs;
+
+	if (lang) {
+		langs.append(lang);
+		setActiveLanguages(langs);
 	}
 	else {
-		qWarning() << QString("Aspell error: %1").arg(aspell_error_message(ret));
+		qWarning() << QString("Aspell error: no default language found");
 	}
 }
 
+void ASpellChecker::clearSpellers()
+{
+	for (ASpellers::iterator it = spellers_.begin(); it != spellers_.end(); ++it)
+		delete_aspell_speller(*it);
+
+       spellers_.clear();
+}
+
 ASpellChecker::~ASpellChecker()
 {
 	if(config_) {
@@ -59,45 +69,58 @@
 		config_ = NULL;
 	}
 
-	if(speller_) {
-		delete_aspell_speller(speller_);
-		speller_ = NULL;
-	}
+	clearSpellers();
 }
 
 bool ASpellChecker::isCorrect(const QString& word)
 {
-	if(speller_) {
-		int correct = aspell_speller_check(speller_, word.toUtf8().constData(), -1);
-		return (correct != 0);
+	if (!spellers_.empty()) {
+		for (ASpellers::iterator it = spellers_.begin(); it != spellers_.end(); ++it) {
+			if (aspell_speller_check(*it, word.toUtf8().constData(), -1) != 0)
+				return true;
+		}
+		return false;
 	}
 	return true;
 }
 
-QList<QString> ASpellChecker::suggestions(const QString& word)
+QList<QString> ASpellChecker::suggestions(const QString& word, const QString& lang, unsigned max_sugs)
 {
 	QList<QString> words;
-	if (speller_) {
-		const AspellWordList* list = aspell_speller_suggest(speller_, word.toUtf8(), -1); 
-		AspellStringEnumeration* elements = aspell_word_list_elements(list);
-		const char *c_word;
-		while ((c_word = aspell_string_enumeration_next(elements)) != NULL) {
-			words += QString::fromUtf8(c_word);
+
+	if (!spellers_.empty()) {
+		for (ASpellers::iterator it = spellers_.begin(); it != spellers_.end(); ++it) {
+			AspellConfig* conf = aspell_speller_config(*it);
+			if (lang == aspell_config_retrieve(conf, "lang")) {
+				const AspellWordList* list = aspell_speller_suggest(*it, word.toUtf8(), -1); 
+				AspellStringEnumeration* elements = aspell_word_list_elements(list);
+				const char *c_word;
+				unsigned count = 0;
+				while ((c_word = aspell_string_enumeration_next(elements)) != NULL && (!max_sugs || count < max_sugs)) {
+					words += QString::fromUtf8(c_word);
+					++count;
+				}
+				delete_aspell_string_enumeration(elements);
+			}
 		}
-		delete_aspell_string_enumeration(elements);
 	}
 	return words;
 }
 
-bool ASpellChecker::add(const QString& word)
+bool ASpellChecker::add(const QString& word, const QString& lang)
 {
 	bool result = false;
-	if (config_ && speller_) {
+	if (config_ && !spellers_.empty()) {
 		QString trimmed_word = word.trimmed();
 		if(!word.isEmpty()) {
-			aspell_speller_add_to_personal(speller_, trimmed_word.toUtf8(), trimmed_word.toUtf8().length());
-			aspell_speller_save_all_word_lists(speller_);
-			result = true;
+			for (ASpellers::iterator it = spellers_.begin(); it != spellers_.end(); ++it) {
+				AspellConfig* conf = aspell_speller_config(*it);
+				if (lang == aspell_config_retrieve(conf, "lang")) {
+					aspell_speller_add_to_personal(*it, trimmed_word.toUtf8(), trimmed_word.toUtf8().length());
+					aspell_speller_save_all_word_lists(*it);
+					result = true;
+				}
+			}
 		}
 	}
 	return result;
@@ -105,10 +128,55 @@
 
 bool ASpellChecker::available() const
 {
-	return (speller_ != NULL);
+	return ! getAllLanguages().isEmpty();
 }
 
 bool ASpellChecker::writable() const
 {
-	return false;
+	return true;
+}
+
+QList<QString> ASpellChecker::getAllLanguages() const
+{
+	QList<QString> langs;
+
+	AspellDictInfoList* dict_info_list = get_aspell_dict_info_list(config_);
+
+	if (!aspell_dict_info_list_empty(dict_info_list)) {
+
+		AspellDictInfoEnumeration* dict_info_enum = aspell_dict_info_list_elements(dict_info_list);
+
+		while (!aspell_dict_info_enumeration_at_end(dict_info_enum)) {
+			const AspellDictInfo* dict_info = aspell_dict_info_enumeration_next(dict_info_enum);
+			QString lang(dict_info -> code);
+			if (lang.contains('_'))
+				lang.truncate(lang.indexOf('_'));
+			if (!langs.contains(lang)) {
+				langs.append(lang);
+			}
+		}
+
+		delete_aspell_dict_info_enumeration(dict_info_enum);
+	}
+
+	return langs;
+}
+
+void ASpellChecker::setActiveLanguages(const QList<QString>& langs)
+{
+	clearSpellers();
+
+	for (QList<QString>::const_iterator it = langs.begin(); it != langs.end(); ++it)
+	{
+		AspellConfig* conf = aspell_config_clone(config_);
+		aspell_config_replace(conf, "lang", *it);
+		AspellCanHaveError* ret = new_aspell_speller(conf);
+		if (aspell_error_number(ret) == 0) {
+			spellers_.append(to_aspell_speller(ret));
+		}
+		else {
+			qWarning(QString("Aspell error: %1").arg(aspell_error_message(ret)).toAscii());
+		}
+		delete_aspell_config(conf);
+	}
 }
diff -dPNur psi-0.14/src/libpsi/tools/spellchecker/aspellchecker.h psi-0.14-ds/src/libpsi/tools/spellchecker/aspellchecker.h
--- psi-0.14/src/libpsi/tools/spellchecker/aspellchecker.h	2009-12-02 22:43:43.000000000 +0100
+++ psi-0.14-ds/src/libpsi/tools/spellchecker/aspellchecker.h	2012-01-17 03:10:53.000000000 +0100
@@ -40,15 +40,21 @@
 public:
 	ASpellChecker();
 	~ASpellChecker();
-	virtual QList<QString> suggestions(const QString&);
+	virtual QList<QString> suggestions(const QString&, const QString& lang, unsigned max_sugs);
 	virtual bool isCorrect(const QString&);
-	virtual bool add(const QString&);
+	virtual bool add(const QString& word, const QString& lang);
 	virtual bool available() const;
 	virtual bool writable() const;
+	virtual QList<QString> getAllLanguages() const;
+	virtual void setActiveLanguages(const QList<QString>&);
 
 private:
+	typedef QList<AspellSpeller*> ASpellers;
 	AspellConfig* config_;
-	AspellSpeller* speller_;
+	ASpellers spellers_;
+
+private:
+	void clearSpellers();
 };
 
 #endif
diff -dPNur psi-0.14/src/libpsi/tools/spellchecker/macspellchecker.h psi-0.14-ds/src/libpsi/tools/spellchecker/macspellchecker.h
--- psi-0.14/src/libpsi/tools/spellchecker/macspellchecker.h	2009-12-02 22:43:43.000000000 +0100
+++ psi-0.14-ds/src/libpsi/tools/spellchecker/macspellchecker.h	2012-01-17 03:10:53.000000000 +0100
@@ -37,9 +37,9 @@
 public:
 	MacSpellChecker();
 	~MacSpellChecker();
-	virtual QList<QString> suggestions(const QString&);
+	virtual QList<QString> suggestions(const QString&, const QString&, unsigned);
 	virtual bool isCorrect(const QString&);
-	virtual bool add(const QString&);
+	virtual bool add(const QString&, const QString&);
 	virtual bool available() const;
 	virtual bool writable() const;
 };
diff -dPNur psi-0.14/src/libpsi/tools/spellchecker/macspellchecker.mm psi-0.14-ds/src/libpsi/tools/spellchecker/macspellchecker.mm
--- psi-0.14/src/libpsi/tools/spellchecker/macspellchecker.mm	2009-12-02 22:43:43.000000000 +0100
+++ psi-0.14-ds/src/libpsi/tools/spellchecker/macspellchecker.mm	2012-01-17 03:10:53.000000000 +0100
@@ -44,7 +44,7 @@
 	return (range.length == 0);
 }
 
-QList<QString> MacSpellChecker::suggestions(const QString& word)
+QList<QString> MacSpellChecker::suggestions(const QString& word, const QString& lang, unsigned max_sugs)
 {
 	QList<QString> s;
 
@@ -57,7 +57,7 @@
 	return s;
 }
 
-bool MacSpellChecker::add(const QString& word)
+bool MacSpellChecker::add(const QString& word, const QString& lang)
 {
 	return false;
 }
diff -dPNur psi-0.14/src/libpsi/tools/spellchecker/spellchecker.cpp psi-0.14-ds/src/libpsi/tools/spellchecker/spellchecker.cpp
--- psi-0.14/src/libpsi/tools/spellchecker/spellchecker.cpp	2009-12-02 22:43:43.000000000 +0100
+++ psi-0.14-ds/src/libpsi/tools/spellchecker/spellchecker.cpp	2012-01-17 03:10:53.000000000 +0100
@@ -76,14 +76,23 @@
 	return true;
 }
 
-QList<QString> SpellChecker::suggestions(const QString&)
+QList<QString> SpellChecker::suggestions(const QString&, const QString&, unsigned)
 {
 	return QList<QString>();
 }
 
-bool SpellChecker::add(const QString&)
+bool SpellChecker::add(const QString&, const QString&)
 {
 	return false;
 }
 
+QList<QString> SpellChecker::getAllLanguages() const
+{
+	return QList<QString>();
+}
+
+void SpellChecker::setActiveLanguages(const QList<QString>&)
+{
+}
+
 SpellChecker* SpellChecker::instance_ = NULL;
diff -dPNur psi-0.14/src/libpsi/tools/spellchecker/spellchecker.cpp.orig psi-0.14-ds/src/libpsi/tools/spellchecker/spellchecker.cpp.orig
--- psi-0.14/src/libpsi/tools/spellchecker/spellchecker.cpp.orig	1970-01-01 01:00:00.000000000 +0100
+++ psi-0.14-ds/src/libpsi/tools/spellchecker/spellchecker.cpp.orig	2012-01-17 03:10:41.000000000 +0100
@@ -0,0 +1,89 @@
+/*
+ * spellchecker.cpp
+ *
+ * Copyright (C) 2006  Remko Troncon
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * You can also redistribute and/or modify this program under the
+ * terms of the Psi License, specified in the accompanied COPYING
+ * file, as published by the Psi Project; either dated January 1st,
+ * 2005, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#include "spellchecker.h"
+
+#include <QCoreApplication>
+
+#if defined(Q_WS_MAC)
+#include "macspellchecker.h"
+#elif defined(HAVE_ENCHANT)
+#include "enchantchecker.h"
+#elif defined(HAVE_ASPELL)
+#include "aspellchecker.h"
+#endif
+
+SpellChecker* SpellChecker::instance() 
+{
+	if (!instance_) {
+#ifdef Q_WS_MAC
+		instance_ = new MacSpellChecker();
+#elif defined(HAVE_ENCHANT)
+		instance_ = new EnchantChecker();
+#elif defined(HAVE_ASPELL)
+		instance_ = new ASpellChecker();
+#else
+		instance_ = new SpellChecker();
+#endif
+	}
+	return instance_;
+}
+
+SpellChecker::SpellChecker()
+	: QObject(QCoreApplication::instance())
+{
+}
+
+SpellChecker::~SpellChecker()
+{
+}
+
+bool SpellChecker::available() const
+{
+	return false;
+}
+
+bool SpellChecker::writable() const
+{
+	return true;
+}
+
+bool SpellChecker::isCorrect(const QString&)
+{
+	return true;
+}
+
+QList<QString> SpellChecker::suggestions(const QString&)
+{
+	return QList<QString>();
+}
+
+bool SpellChecker::add(const QString&)
+{
+	return false;
+}
+
+SpellChecker* SpellChecker::instance_ = NULL;
diff -dPNur psi-0.14/src/libpsi/tools/spellchecker/spellchecker.h psi-0.14-ds/src/libpsi/tools/spellchecker/spellchecker.h
--- psi-0.14/src/libpsi/tools/spellchecker/spellchecker.h	2009-12-02 22:43:43.000000000 +0100
+++ psi-0.14-ds/src/libpsi/tools/spellchecker/spellchecker.h	2012-01-17 03:10:53.000000000 +0100
@@ -37,9 +37,11 @@
 	static SpellChecker* instance();
 	virtual bool available() const;
 	virtual bool writable() const;
-	virtual QList<QString> suggestions(const QString&);
+	virtual QList<QString> suggestions(const QString& word, const QString& lang, unsigned max_sugs);
 	virtual bool isCorrect(const QString&);
-	virtual bool add(const QString&);
+	virtual bool add(const QString& word, const QString& lang);
+	virtual QList<QString> getAllLanguages() const;
+	virtual void setActiveLanguages(const QList<QString>&);
 
 protected:
 	SpellChecker();
diff -dPNur psi-0.14/src/msgmle.cpp psi-0.14-ds/src/msgmle.cpp
--- psi-0.14/src/msgmle.cpp	2012-01-17 03:09:02.000000000 +0100
+++ psi-0.14-ds/src/msgmle.cpp	2012-01-17 03:12:57.000000000 +0100
@@ -110,12 +110,36 @@
 	return (SpellChecker::instance()->available() && PsiOptions::instance()->getOption("options.ui.spell-check.enabled").toBool());
 }
 
+QStringList ChatEdit::checkSpellingActiveLanguages()
+{
+	return PsiOptions::instance()->getOption("options.ui.spell-check.langs").toString().split(QRegExp("\\s+|,|\\:"), QString::SkipEmptyParts);
+}
+
+unsigned ChatEdit::checkSpellingMaxSuggestions()
+{
+	return PsiOptions::instance()->getOption("options.ui.spell-check.maxsugs").toString().toInt();
+}
+
 void ChatEdit::setCheckSpelling(bool b)
 {
 	check_spelling_ = b;
 	if (check_spelling_) {
 		if (!spellhighlighter_)
 			spellhighlighter_ = new SpellHighlighter(document());
+		all_langs_ = SpellChecker::instance()->getAllLanguages();
+		langs_ = checkSpellingActiveLanguages();
+		// No langs specified in options?
+		if (langs_.isEmpty()) {
+			QString env_lang(getenv("LANG"));
+			// Let's try to use the language specified in environment ...
+			if (!env_lang.isEmpty() && all_langs_.contains(env_lang))
+				langs_.append(env_lang);
+			else // ... still no luck? Will use all available languages then.
+				langs_ = all_langs_;
+		}
+		SpellChecker::instance()->setActiveLanguages(langs_);
+		// If zero, means no limit (empty option also translates to zero).
+		max_sugs_ = checkSpellingMaxSuggestions();
 	}
 	else {
 		delete spellhighlighter_;
@@ -189,19 +213,34 @@
 		tc.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
 		QString selected_word = tc.selectedText();
 		if (!selected_word.isEmpty() && !SpellChecker::instance()->isCorrect(selected_word)) {
-			QList<QString> suggestions = SpellChecker::instance()->suggestions(selected_word);
-			if (!suggestions.isEmpty() || SpellChecker::instance()->writable()) {
-				QMenu spell_menu;
+			QMenu spell_menu;
+			foreach (QString lang, langs_) {
+				QList<QString> suggestions = SpellChecker::instance()->suggestions(selected_word, lang, max_sugs_);
 				if (!suggestions.isEmpty()) {
+					QAction* lang_name = spell_menu.addAction(tr("Language") + ": " + lang);
+					lang_name->setDisabled(true);
 					foreach(QString suggestion, suggestions) {
 						QAction* act_suggestion = spell_menu.addAction(suggestion);
 						connect(act_suggestion,SIGNAL(triggered()),SLOT(applySuggestion()));
 					}
 					spell_menu.addSeparator();
 				}
+			}
+			if (!spell_menu.isEmpty() || SpellChecker::instance()->writable() || !all_langs_.isEmpty()) {
 				if (SpellChecker::instance()->writable()) {
-					QAction* act_add = spell_menu.addAction(tr("Add to dictionary"));
-					connect(act_add,SIGNAL(triggered()),SLOT(addToDictionary()));
+					foreach (QString lang, langs_) {
+						QAction* act_add = spell_menu.addAction(tr("Add to dictionary") + ": " + lang);
+						act_add->setData(lang);
+						connect(act_add,SIGNAL(triggered()),SLOT(addToDictionary()));
+					}
+					spell_menu.addSeparator();
+					foreach (QString lang, all_langs_) {
+						QAction* act_lang_sel = spell_menu.addAction(tr("Use language") + ": " + lang);
+						act_lang_sel->setCheckable(true);
+						act_lang_sel->setChecked(langs_.contains(lang));
+						act_lang_sel->setData(lang);
+						connect(act_lang_sel,SIGNAL(triggered()),SLOT(changedUseLang()));
+					}
 				}
 				spell_menu.exec(QCursor::pos());
 				e->accept();
@@ -251,18 +290,35 @@
  */
 void ChatEdit::addToDictionary()
 {
+	QAction* action = static_cast<QAction*>(sender());
 	QTextCursor	tc = cursorForPosition(last_click_);
 	int current_position = textCursor().position();
 
 	// Get the selected word
 	tc.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor);
 	tc.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor);
-	SpellChecker::instance()->add(tc.selectedText());
+	SpellChecker::instance()->add(tc.selectedText(), action->data().toString());
 
 	// Put the cursor where it belongs
 	tc.clearSelection();
 	tc.setPosition(current_position);
 	setTextCursor(tc);
+
+	spellhighlighter_->rehighlight();
+}
+
+void ChatEdit::changedUseLang()
+{
+	QAction* action = static_cast<QAction*>(sender());
+	QString lang = action->data().toString();
+
+	if (langs_.contains(lang))
+		langs_.remove(lang);
+	else
+		langs_.append(lang);
+
+	SpellChecker::instance()->setActiveLanguages(langs_);
+	spellhighlighter_->rehighlight();
 }
 
 void ChatEdit::optionsChanged()
diff -dPNur psi-0.14/src/msgmle.h psi-0.14-ds/src/msgmle.h
--- psi-0.14/src/msgmle.h	2012-01-17 03:09:02.000000000 +0100
+++ psi-0.14-ds/src/msgmle.h	2012-01-17 03:14:01.000000000 +0100
@@ -47,6 +47,8 @@
 	QSize sizeHint() const;
 
 	static bool checkSpellingGloballyEnabled();
+	static QStringList checkSpellingActiveLanguages();
+	static unsigned checkSpellingMaxSuggestions();
 	void setCheckSpelling(bool);
 
 public slots:
@@ -56,6 +58,7 @@
 protected slots:
  	void applySuggestion();
  	void addToDictionary();
+	void changedUseLang();
 	void optionsChanged();
 	void showHistoryMessageNext();
 	void showHistoryMessagePrev();
@@ -76,6 +79,8 @@
 private:
 	QWidget	*dialog_;
 	bool check_spelling_;
+	QList<QString> langs_, all_langs_;
+	unsigned max_sugs_;
 	SpellHighlighter* spellhighlighter_;
 	QPoint last_click_;
 	int previous_position_;
diff -dPNur psi-0.14/src/options/opt_advanced.cpp psi-0.14-ds/src/options/opt_advanced.cpp
--- psi-0.14/src/options/opt_advanced.cpp	2012-01-17 03:09:01.000000000 +0100
+++ psi-0.14-ds/src/options/opt_advanced.cpp	2012-01-17 03:16:51.000000000 +0100
@@ -45,6 +45,8 @@
 #endif
 
 	d->ck_spell->setEnabled(SpellChecker::instance()->available());
+	d->le_spellLangs->setEnabled(SpellChecker::instance()->available());
+	d->le_spellMaxSugs->setEnabled(SpellChecker::instance()->available());
 
 	d->ck_messageevents->setWhatsThis(
 		tr("Enables the sending and requesting of message events such as "
@@ -60,6 +62,12 @@
 		tr("Enables remote controlling your client from other locations"));
 	d->ck_spell->setWhatsThis(
 		tr("Check this option if you want your spelling to be checked"));
+	d->le_spellLangs->setWhatsThis(
+		tr("List here all languages you want your spell checker to use"
+		" when checking your spelling."));
+	d->le_spellMaxSugs->setWhatsThis(
+		tr("Maximal number of suggestion words per language you want to see"
+		" in context menu when the word is misspelled."));
 	d->ck_contactsMessageFormatting->setWhatsThis(
 		tr("If enabled, Psi will display incoming messages formatted in the style specified by the contact"));
 	d->ck_autocopy->setWhatsThis(
@@ -97,6 +105,10 @@
 
 	connect(d->ck_messageevents,SIGNAL(toggled(bool)),d->ck_inactiveevents,SLOT(setEnabled(bool)));
 	d->ck_inactiveevents->setEnabled(d->ck_messageevents->isChecked());
+	connect(d->ck_spell,SIGNAL(toggled(bool)),d->le_spellLangs,SLOT(setEnabled(bool)));
+	connect(d->ck_spell,SIGNAL(toggled(bool)),d->le_spellMaxSugs,SLOT(setEnabled(bool)));
+	d->le_spellLangs->setEnabled(d->ck_spell->isChecked());
+	d->le_spellMaxSugs->setEnabled(d->ck_spell->isChecked());
 
 	return w;
 }
@@ -113,8 +125,11 @@
 	PsiOptions::instance()->setOption("options.ui.notifications.request-receipts", d->ck_requestReceipts->isChecked());
 	PsiOptions::instance()->setOption("options.ui.notifications.send-receipts", d->ck_sendReceipts->isChecked());
 	PsiOptions::instance()->setOption("options.external-control.adhoc-remote-control.enable", d->ck_rc->isChecked());
-	if ( SpellChecker::instance()->available() )
+	if ( SpellChecker::instance()->available() ) {
 		PsiOptions::instance()->setOption("options.ui.spell-check.enabled",d->ck_spell->isChecked());
+		PsiOptions::instance()->setOption("options.ui.spell-check.langs", d->le_spellLangs->text());
+		PsiOptions::instance()->setOption("options.ui.spell-check.maxsugs", d->le_spellMaxSugs->text());
+	}
 	PsiOptions::instance()->setOption("options.html.chat.render", d->ck_contactsMessageFormatting->isChecked());
 	PsiOptions::instance()->setOption("options.ui.automatically-copy-selected-text", d->ck_autocopy->isChecked());
 	PsiOptions::instance()->setOption("options.ui.contactlist.use-single-click", d->ck_singleclick->isChecked());
@@ -141,10 +156,15 @@
 	d->ck_requestReceipts->setChecked( PsiOptions::instance()->getOption("options.ui.notifications.request-receipts").toBool() );
 	d->ck_sendReceipts->setChecked( PsiOptions::instance()->getOption("options.ui.notifications.send-receipts").toBool() );
 	d->ck_rc->setChecked( PsiOptions::instance()->getOption("options.external-control.adhoc-remote-control.enable").toBool() );
-	if ( !SpellChecker::instance()->available() )
+	if ( !SpellChecker::instance()->available() ) {
 		d->ck_spell->setChecked(false);
-	else
+		d->le_spellLangs->setText("");
+		d->le_spellMaxSugs->setText("");
+	} else {
 		d->ck_spell->setChecked(PsiOptions::instance()->getOption("options.ui.spell-check.enabled").toBool());
+		d->le_spellLangs->setText(PsiOptions::instance()->getOption("options.ui.spell-check.langs").toString());
+		d->le_spellMaxSugs->setText(PsiOptions::instance()->getOption("options.ui.spell-check.maxsugs").toString());
+	}
 	d->ck_contactsMessageFormatting->setChecked(PsiOptions::instance()->getOption("options.html.chat.render").toBool());
 	d->ck_autocopy->setChecked( PsiOptions::instance()->getOption("options.ui.automatically-copy-selected-text").toBool() );
 	d->ck_singleclick->setChecked( PsiOptions::instance()->getOption("options.ui.contactlist.use-single-click").toBool() );
diff -dPNur psi-0.14/src/options/opt_advanced.ui psi-0.14-ds/src/options/opt_advanced.ui
--- psi-0.14/src/options/opt_advanced.ui	2012-01-17 03:09:01.000000000 +0100
+++ psi-0.14-ds/src/options/opt_advanced.ui	2012-01-17 03:10:53.000000000 +0100
@@ -62,6 +62,26 @@
     </widget>
    </item>
    <item>
+    <widget class="QLabel" name="TextLabel3" >
+     <property name="text" >
+      <string>List of active spellchecker languages:</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="le_spellLangs" />
+   </item>
+   <item>
+    <widget class="QLabel" name="TextLabel4" >
+     <property name="text" >
+      <string>Maximum suggestions per language:</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QLineEdit" name="le_spellMaxSugs" />
+   </item>
+   <item>
     <widget class="QCheckBox" name="ck_contactsMessageFormatting" >
      <property name="text" >
       <string>Use contacts' message formatting</string>
diff -dPNur psi-0.14/src/options/opt_advanced.ui.orig psi-0.14-ds/src/options/opt_advanced.ui.orig
--- psi-0.14/src/options/opt_advanced.ui.orig	1970-01-01 01:00:00.000000000 +0100
+++ psi-0.14-ds/src/options/opt_advanced.ui.orig	2012-01-17 03:10:41.000000000 +0100
@@ -0,0 +1,188 @@
+<ui version="4.0" >
+ <class>OptAdvanced</class>
+ <widget class="QWidget" name="OptAdvanced" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>509</width>
+    <height>429</height>
+   </rect>
+  </property>
+  <property name="windowTitle" >
+   <string>OptAdvancedUI</string>
+  </property>
+  <layout class="QVBoxLayout" >
+   <property name="margin" >
+    <number>9</number>
+   </property>
+   <property name="spacing" >
+    <number>6</number>
+   </property>
+   <item>
+    <widget class="QCheckBox" name="ck_messageevents" >
+     <property name="text" >
+      <string>Enable "Contact is typing ..." events</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_inactiveevents" >
+     <property name="text" >
+      <string>Enable "Inactivity" events (end/suspend conversation)</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_requestReceipts" >
+     <property name="text" >
+      <string>Request receipts</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_sendReceipts" >
+     <property name="text" >
+      <string>Send receipts</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_rc" >
+     <property name="text" >
+      <string>Enable remote controlling from other locations</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_spell" >
+     <property name="text" >
+      <string>Check spelling</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_contactsMessageFormatting" >
+     <property name="text" >
+      <string>Use contacts' message formatting</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_singleclick" >
+     <property name="text" >
+      <string>Single-click triggers default action</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_autocopy" >
+     <property name="text" >
+      <string>Automatically copy selected text to clipboard</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_grabUrls" >
+     <property name="text" >
+      <string>Grab URLs from clipboard</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_jidComplete" >
+     <property name="text" >
+      <string>Jabber ID completion</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_showSubjects" >
+     <property name="text" >
+      <string>Show subject line in events</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_showCounter" >
+     <property name="text" >
+      <string>Show character counter</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_autoVCardOnLogin" >
+     <property name="text" >
+      <string>Automatically get vCard when becoming online</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_rosterAnim" >
+     <property name="text" >
+      <string>Animate the roster when a contact comes online</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_scrollTo" >
+     <property name="text" >
+      <string>Scroll roster to contact on event</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="ck_ignoreHeadline" >
+     <property name="text" >
+      <string>Ignore "Headline" events (e.g. MSN alerts)</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" >
+     <property name="margin" >
+      <number>0</number>
+     </property>
+     <property name="spacing" >
+      <number>6</number>
+     </property>
+     <item>
+      <widget class="QLabel" name="TextLabel2" >
+       <property name="text" >
+        <string>Treat incoming messages and chats as:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QComboBox" name="cb_incomingAs" >
+       <item>
+        <property name="text" >
+         <string>Determined by sender</string>
+        </property>
+       </item>
+       <item>
+        <property name="text" >
+         <string>Messages</string>
+        </property>
+       </item>
+       <item>
+        <property name="text" >
+         <string>Chats</string>
+        </property>
+       </item>
+       <item>
+        <property name="text" >
+         <string>Messages (Chats if Chatting)</string>
+        </property>
+       </item>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections/>
+</ui>
