{"id":2124,"date":"2012-10-04T14:25:44","date_gmt":"2012-10-04T14:25:44","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/webdev\/2012\/10\/04\/spell-checker-extension-for-visual-studio-2012-html-asp-net-css-and-other-files\/"},"modified":"2022-08-10T06:08:21","modified_gmt":"2022-08-10T13:08:21","slug":"spell-checker-extension-for-visual-studio-2012-html-asp-net-css-and-other-files","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/spell-checker-extension-for-visual-studio-2012-html-asp-net-css-and-other-files\/","title":{"rendered":"Spell Checker extension for Visual Studio 2012 HTML, ASP.NET, CSS and other files"},"content":{"rendered":"<p>I have updated spell checker extension for Visual Studio 2012. You can download it from <a href=\"http:\/\/visualstudiogallery.msdn.microsoft.com\/09cdc0c3-c50b-4bfd-a567-b7125c244b10\" target=\"_blank\" rel=\"noopener\">Visual Studio Gallery<\/a>.<\/p>\n<p>Spell checker supports text verification in:<\/p>\n<ul>\n<li>HTML and ASP.NET element content and attributes<\/li>\n<li>HTML style comments <span style=\"color: green\"><strong>&lt;&#8211; HTML &#8211;&gt;<\/strong><\/span><\/li>\n<li>ASP.NET server side comments:<strong><span style=\"color: green\"> &lt;%&#8211; ASP.NET &#8211;%&gt;<\/span><\/strong><\/li>\n<li>JScript, C# and C++ comments: <strong><span style=\"color: green\">\/\/ C++ style comments<\/span><\/strong><\/li>\n<li>CSS and C style comments: <strong><span style=\"color: green\">\/* C style comments *\/ <\/span><\/strong><\/li>\n<li>VB and VBScript style comments: <strong><span style=\"color: green\">&#8216;This is VB comment <\/span><\/strong><\/li>\n<\/ul>\n<p><span style=\"color: #000000\">Spell checking is supported in style and script blocks as well as in JS, CS, VB, CSS, CPP and H files. Spell checker is able to&nbsp;detects <em>lang<\/em> attribute specified on HTML elements, extract ISO language and use it to specify appropriate dictionary for the Office spell checking engine. <\/span><\/p>\n<p><span style=\"color: #000000\"><strong><span style=\"text-decoration: underline\">Requirements<\/span><strong><span style=\"text-decoration: underline\"><br \/><\/span><\/strong><br \/> <\/strong>Microsoft Visual Studio 2012 any edition except Express.<br \/> Microsoft Word 2003, 2007 or 2010. Extension was not tested with Office 15 preview<strong>.<\/strong><\/span><\/p>\n<p><span style=\"color: #000000\"><strong><\/strong><\/span><\/p>\n<p><strong><span style=\"text-decoration: underline\"><span style=\"color: #000000;text-decoration: underline\">How to use Spell Checker<\/span><\/span><\/strong><\/p>\n<p><span style=\"color: #000000\">After installing the extension you should see Spell Checker menu item in the Tools menu. Spell checker is not &#8216;as you type&#8217; so you have to click the menu item each time you want to re-check the document.<\/span><\/p>\n<p><span style=\"color: #000000\"><strong><\/strong><\/span>&nbsp;<\/p>\n<p><span style=\"color: #000000\"><strong><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/10\/2248.SpellChecker1.png\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/10\/2248.SpellChecker1.png\" border=\"0\" \/><\/a><\/strong><\/span><\/p>\n<p><strong><span style=\"color: green\"><\/span><\/strong>&nbsp;<\/p>\n<p>Spell checker messages also show up in the Error List as informational messages. They are not entered as errors or warnings so they don&#8217;t break builds. Right click on the error marker allows you to pick correct word from list of suggestions.<\/p>\n<p><strong><span style=\"color: green\"><\/span><\/strong>&nbsp;<\/p>\n<p><strong><span style=\"color: green\"><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/10\/8206.SpellChecker2.png\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/10\/8206.SpellChecker2.png\" border=\"0\" \/><\/a><\/span><\/strong><\/p>\n<p><strong><span style=\"color: green\"><\/span><\/strong>&nbsp;<\/p>\n<p><span style=\"color: #000000\">Spell checker is able to&nbsp;detects <i>lang<\/i>attribute specified on elements, extract ISO language and use it to specify appropriate dictionary for the Office spell checking engine. <\/span>You can define language of comments in non-HTML files by adding the following in the first comment in the file:<\/p>\n<p><span style=\"color: #339966\">\/\/ &lt;spellcheck-language=&#8217;fr&#8217;<\/span><\/p>\n<p><span style=\"color: #000000\"><\/span><\/p>\n<p><span style=\"color: #000000\">In order to be able to spell check pages in multiple languages you may need to install appropriate <span style=\"color: #3366ff\"><a href=\"http:\/\/office.microsoft.com\/en-us\/language-packs\/\" target=\"_blank\" rel=\"noopener\"><span style=\"color: #3366ff\">Office Language Pack<\/span><\/a><\/span>. If you never used particular language dictionary in Word, you have to try using it at least once before it becomes available to the Spell Checker extension. Many dictionaries are installed on demand and if particular language was never activated in Word, the dictionary may be missing. Open Word, type something in the desired language and run Word spell checker at least once to make sure it works and dictionary is installed.<\/span><\/p>\n<p><span style=\"color: #000000\">Office language options can be found in Word <strong>File | Options<\/strong> menu:<\/span><\/p>\n<p><strong><span style=\"color: green\"><a href=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/10\/3581.WordLanguageOptions.png\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2012\/10\/3581.WordLanguageOptions.png\" border=\"0\" \/><\/a><\/span><\/strong><\/p>\n<p><strong><span style=\"color: green\"><\/span><\/strong>&nbsp;<\/p>\n<p><strong><span style=\"color: green\"><span style=\"color: #000000\"><b><span style=\"text-decoration: underline\">Customization<\/span><\/b><\/span><\/p>\n<p><\/span><\/strong>You can customize spell checker behavior by editing rules.xml file located in the extension install folder (typically under <strong>C:Users&lt;user_name&gt;AppDataLocalMicrosoftVisualStudio11.0Extensions<\/strong>. You can exclude certain elements and add more rules for attribute checking if you want spell checker to verify spelling in custom control attributes. All element and attribute names much be in lowercase. You don&#8217;t have to close document or Visual Studio after editing the file, the file is loaded every time spell checking is performed.<\/p>\n<pre style=\"font-family: Courier New;font-size: 10pt\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;<br \/>&lt;rules&gt;<br \/>  &lt;!-- Exclude content of script and style elements from spell check --&gt;<br \/>  &lt;exclude name=\"script\" \/&gt;<br \/>  &lt;exclude name=\"style\" \/&gt;<br \/><br \/>  &lt;!-- Check 'value' attribute on all elements without a namespace --&gt;<br \/>  &lt;element name=\"*\"&gt;<br \/>    &lt;attribute name=\"value\" \/&gt;<br \/>  &lt;\/element&gt;<br \/><br \/>  &lt;!-- Rules in ASP namespace --&gt;<br \/>  &lt;namespace name=\"asp\"&gt;<br \/><br \/>    &lt;!-- Check all attributes ending in 'text' as well as tooltip attribute in all ASP.NET elements --&gt;<br \/>    &lt;element name=\"*\"&gt;<br \/>      &lt;attribute name=\"*text\" \/&gt;<br \/>      &lt;attribute name=\"tooltip\" \/&gt;<br \/>    &lt;\/element&gt;<br \/><br \/>    &lt;!-- Special rule for asp:Calendar --&gt;<br \/>    &lt;element name=\"calendar\"&gt;<br \/>      &lt;attribute name=\"caption\" \/&gt;<br \/>    &lt;\/element&gt;<br \/><br \/>    &lt;!-- Add more rules for ASP.NET elements here if needed --&gt;<br \/>  &lt;\/namespace&gt;<br \/><br \/>  &lt;!-- Add rules for custom controls here if needed --&gt;<br \/>  <br \/>&lt;\/rules&gt;<\/pre>\n<p><span style=\"color: #000000\">Thanks<\/span><\/p>\n<p><strong><span style=\"color: #000000\">Mikhail Arkhipov<\/span><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have updated spell checker extension for Visual Studio 2012. You can download it from Visual Studio Gallery. Spell checker supports text verification in: HTML and ASP.NET element content and attributes HTML style comments &lt;&#8211; HTML &#8211;&gt; ASP.NET server side comments: &lt;%&#8211; ASP.NET &#8211;%&gt; JScript, C# and C++ comments: \/\/ C++ style comments CSS and [&hellip;]<\/p>\n","protected":false},"author":456,"featured_media":58792,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[197],"tags":[7261,7272,147,7412,7389],"class_list":["post-2124","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aspnet","tag-css-and-html","tag-tips-and-tricks","tag-visual-studio","tag-visual-studio-2012","tag-web-development"],"acf":[],"blog_post_summary":"<p>I have updated spell checker extension for Visual Studio 2012. You can download it from Visual Studio Gallery. Spell checker supports text verification in: HTML and ASP.NET element content and attributes HTML style comments &lt;&#8211; HTML &#8211;&gt; ASP.NET server side comments: &lt;%&#8211; ASP.NET &#8211;%&gt; JScript, C# and C++ comments: \/\/ C++ style comments CSS and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/456"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=2124"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/2124\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/58792"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=2124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=2124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=2124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}