We have created a site in cq with parent node as en_gb and try to use spell checker in richtext editor but it fails. Looking into the debug logs, it is looking for a dictionary as en_gb_en_gb which does not exists and hence the spell checker does not work. Debugging further we found that the logic written in SpellCheckServlet & LanguageUtil seems to be incorrect as it returns language as en_gb & country also as en_gb rahter it should be lan= en & country = gb.
However, spell checker documentation says
The spelling checker will operate in the language of the website by taking either the language property of the subtree or extracting the language from the URL; i.e. the en branch will be checked for english, the de branch for german.
But both seems to fail.
Please suggest if there is something wrong in what I am doing or it is a bug in CQ?
Create your own servlet for cheking spelling as CQ does with API "com.day.cq.spellchecker".
And then add the servlet path to "spellcheck" plugin property.
Property name: spellcheckerUrl
Value : <servlet-path>