Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Development Edition
Naming Warnings
 Resource strings should be spelled ...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual Studio Team System
Resource strings should be spelled correctly

TypeName

ResourceStringsShouldBeSpelledCorrectly

CheckId

CA1703

Category

Microsoft.Naming

Breaking Change

Non Breaking

A resource string contains one or more words that are not recognized by the Microsoft spelling checker library.

This rule parses the resource string into words (tokenizing compound words) and checks the spelling of each word/token. For information about the parsing algorithm, see Identifiers should be spelled correctly.

In order for this rule to fire the assemblies must be marked with the AssemblyCultureAttribute or the NeutralResourcesLanguageAttribute.

This rule only supports English based cultures. This rule will not fire for any other cultures. By default, the English (en) version of the spelling checker is used.

To fix a violation of this rule, use complete words that are correctly spelled or add the words to a custom dictionary. For information about how to use custom dictionaries, see Identifiers should be spelled correctly.

Do not suppress a warning from this rule. Correctly spelled words reduce the time it takes to learn new software libraries.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
The English version of the spelling checker isn't used by default      David M. Kean   |   Edit   |   Show History

The statement The English (en) version of the spelling checker is used by default is actually incorrect. This rule will only fire if an assembly is marked with the NeutralResourcesLanguageAttribute or AssemblyCultureAttribute (normally for use by satellite assemblies only).

For example, specifying the following will cause Code Analysis to spell check resources using the English (United States) lexicon:

[C#]
 
[assembly: NeutralResourcesLanguage("en-US")]

[Visual Basic] 
 
<Assembly: NeutralResourcesLanguage("en-US")>
 

[C++]
 
[assembly: NeutralResourcesLanguage("en-US")];


Whereas, specifying the following will cause Code Analysis to spell check resources using the English (Australia) lexicon:

[C#]
 
[assembly: NeutralResourcesLanguage("en-AU")]

[Visual Basic]
  
<Assembly: NeutralResourcesLanguage("en-AU")>

[C++]
  
[assembly: NeutralResourcesLanguage("en-AU")];
Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker