Gadgets/Rechtschreibpruefung
- Summary: Spell checking for common errors while reading articles. Spelling mistakes are highlighted in red, and pointing the mouse over them shows possible corrections
- More details:
- de:Wikipedia:Helferlein/Rechtschreibprüfung
- es:Wikipedia:Corrector ortográfico
- fa:ویکیپدیا:اشتباهیاب
- gl:Wikipedia:Revisor ortográfico
- he:ויקיפדיה:סקריפטים/בודק איות
Setup
editTo setup the gadget in new project (that supports Wikidata):
- Create a dictionary of common mistakes - with the same format as in de:Wikipedia:Helferlein/Rechtschreibprüfung/Wortliste
- Link to Wikidata - Link the new dictionary page to wikidata: d:Q15098221
- Add the source code
- To turn it as a gadget that user can select in their preferences (requires sysop rights):
- create MediaWiki:Gadget-spellchecker.js with the following code:
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User%3A%D7%A2%D7%A8%D7%9F%2Fspellchecker.js&action=raw&ctype=text/javascript');
- create MediaWiki:Gadget-spellchecker with short description
- add it to MediaWiki:Gadgets-definition
- create MediaWiki:Gadget-spellchecker.js with the following code:
- To test it (if you aren't sysop):
- add the source code to your personal JS (Special:MyPage/common.js).
mw.loader.load('https://meta.wikimedia.org/w/index.php?title=User%3A%D7%A2%D7%A8%D7%9F%2Fspellchecker.js&action=raw&ctype=text/javascript');
- add the source code to your personal JS (Special:MyPage/common.js).
- To turn it as a gadget that user can select in their preferences (requires sysop rights):
FAQ
editSome word is highlighted as mistake, but it is in citation
editThe script doesn't do spell-checking in citation tags: blockquote, q, cite. It also ignores any citation between „ and “. It is recommended to use citation tags within citation templates (use style attribute to control the styling).
Language variants
editIn some languages there are different variants - and it is possible to use different dictionaries for different variants. Copy the code in User:ערן/spellchecker.js and replace langVariants with variants specification. For example:
var langVariants = {
'VARIANT-NAME': 'VARIANT-CODE',
'VARIANT-NAME2': 'VARIANT-CODE2'
}
And then create a subpage for the dictionary page with /VARIANT-CODE suffix. In any page the contains VARIANT-NAME in its text, the spellchecker will use this subpage instead of the default dictionary.
Example: if the dictionary is located in a page Wikipedia:Spell checker/dictionary, and the following langVariants are used
var langVariants = {
'Britain': 'uk'
}
Then in any page the contains the word "Britain" the spell checker will use Wikipedia:Spell checker/dictionary/uk instead of Wikipedia:Spell checker/dictionary.
Spell-checking while editing
editThe script checks spelling while reading or while editing in the VisualEditor. It is highly recommended to install also a native spell-checking within the browser - it has much larger dictionary of mistakes and it can treat language specific grammar rules. The following links give more details (browser specific):