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

1

7

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.

Magritte answered 3/2, 2010 at 21:36 Comment(0)
M
2

I ended up resorting 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:

Magritte answered 28/4, 2010 at 19:8 Comment(2)
Do you remember where the "confirmed" link should point to? Currently it points back to this question (:Boding
I probably pasted the wrong link back then. Anyway, searching around for a couple of minutes, I wasn't able to find anything that would back up my claim, so I've updated the answer to remove the link.Magritte

© 2022 - 2024 — McMap. All rights reserved.