Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

What is the best way to hide or remove languages from the spell checker? I want to reduce the available languages down to only three entries.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I've found a way to do this in javascript. The languages are not actually removed and the script must be run every time a page loads in edit mode, but the result is that any language(s) can be hidden from the spell-checker list.

The languages available to the spell checker is exposed in a global javascript object

window.spellcheck; //The spellcheck object
spellcheck.defaultLanguage; //The lcid for the default language
spellcheck.languages; //An array of all available languages with name and lcid
spellcheck.siteUrl; //The url to the current SPSite (I think)

To remove languages you don't want to display simply remove them from the languages array.

This is a short version of the code I'm using (requires jQuery):

var keepLanguagesLCID = [1044, 2068, 1033]; //Keep bokmål, nynorsk and english.
//Filter the languages array and extract only those languages with a valid lcid.
spellcheck.languages = $.grep(spellcheck.languages, function (elem, idx) {
    return $.inArray(elem.lcid, keepLanguagesLCID) >= 0;
});
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.