Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Visual Studio add-in for populating resource files from strings in a code file?

I'm maintaining a WinForms application which was not written using any development patters conducive to localizing the classes in the project which were not directly associated with forms, or the code-behind partials of the forms.

Thus, there is MessageBox() code with English text in it in almost every code file. I'd like to find a tool which will "scrape" those strings from the code, insert the strings in a resource file, and substitute a call to the resource with the substituted string in a comment.

Does such a tool exist?

like image 209
Rob Perkins Avatar asked Feb 24 '23 20:02

Rob Perkins


2 Answers

See ReSharper 5 Internationalization Features

When ReSharper finds a localizable string, it helps you move it to a resource file with only a couple of clicks. You can optionally search for identical strings and refactor them to use the new resource item.

Hope it helps.

like image 193
Sebastian Zaklada Avatar answered Feb 27 '23 16:02

Sebastian Zaklada


The Visual Localizer projects focuses on this very issue and is free.

like image 33
cre8or Avatar answered Feb 27 '23 17:02

cre8or