views:

35

answers:

1

Using the tip provided by José Adan at http://social.msdn.microsoft.com/Forums/en-US/vstscode/thread/f6dec8c4-9752-4a9b-82fe-0822808fd386/ I was able to get Code Analysis to do spell checking in Brazilian Portuguese.

It's a common practice to mix Portuguese and English on type and member names down here in Brazil. I've also seen this practice in other languages in code originating from Europe.

So what I am trying to do is to enable both languages.

I searched around and after not finding anything I did some experimentation with things such as

<CodeAnalysisCulture>en-US;pt-BR</CodeAnalysisCulture>

and

<CodeAnalysisCulture>en-US&</CodeAnalysisCulture>
<CodeAnalysisCulture>pt-BR&</CodeAnalysisCulture>

Neither worked. The first one broke with a compilation error and the second one used the last language defined.

I'm almost sure Code Analysis does not support this, but as a last resort, I'm asking:

Does Code Analysis support defining two languages for mixed language Spell Checking?

PS: I'm already aware of custom dictionaries. It's my backup plan.

A: 

Folks from the Code Analysis Team have confirmed this as a scenario not supported by current tooling, so I resorted to my backup plan which was to use a custom dictionary.

I must say it is working well, although there could be better tooling for including new words without having to manually edit the XML files - something like the tools Word provides for adding word to its custom dictionary.

Another reason for using a custom dictionary is that our language (Brazilian Portuguese) make use of accented characters, but we generally don't use accents when naming types or members in code.

More information on how to use custom dictionaries can be found at:

Alfred Myers