Highlighting XAML Strings that need Localization?

Can ReSharper be configured to highlight areas of Silverlight XAML that could potentially need to be localized?

Currently, I am using the regular expression below and VS2010's regular expression search capabilities to locate potential attributes and elements (e.g. Text, ToolTip, Header, Content, Button, Run, TextBlock, etc...) that contain localizable strings in my XAML files that need to be localized. The down side is that this has to be done manually. Essentially, my regular expression assumes that if the contents of the attribute is not a binding expression (e.g. is not something like "<TextBlock Text="{Binding Module_ModuleName, Source={StaticResource ModuleResources}}"/>") then the attribute likely needs to be localized.

Regular Expression:

What would be really nice is to have ReSharper simply warn when it finds these types of strings in a XAML file but I have no idea how to use the ReSharper Pattern Syntax to accomplish this.

Is it possible to have ReSharper use the regular expression above to highlight these localizable strings?


Please sign in to leave a comment.