Description of problem:
When checking a single script document the spellchecker needs to know what language should it use
for example if the document contains French and English text, then it should be told according to which dictionary should it use, because both use the Latin scripts language can't detected.
but if the document contains English and Arabic texts it should be able to know which parts to check against the English dictionary and which against the Arabic
Steps to Reproduce:
1. start pidgin or firefox with hunspell-ar and hunspell-en install
2. type a mixed text like "Peace be upon those who follow guidance السلام على من اتبع الهدى"
only on of the two messages will be checked
both should be checked
some scripts represents more than one languages including the Arabic script which is used by Persian language for example
the spell check should work like this
for word in words:
if n==1: use_this_dict()
of course get_number_of_installed_dicts_for_script should use some sort of cache