ReSharper
 
Get ReSharper
Get your hands on the new features ahead of the release by joining the Early Access Program for ReSharper 2025.1! Learn more

Quickly internationalize a .NET application

Last modified: 11 February 2024

Let’s say you want to quickly add multi-language support to your app, but don’t want to start messing with RESX files. Indeed, there is an easier way. Given the following code:

To move the string into a resource, move the caret over the string, open up the Refactor This menu CtrlShift0R and choose Move to Resource:

Applying the 'Move to Resource' refactoring

Now, if you don’t have a resource file, ReSharper will warn you about it:

Applying the 'Move to Resource' refactoring

Making one is easy, though:

Applying the 'Move to Resource' refactoring

And now if you try to move a string to a resource, ReSharper will notice the newly created RESX file and offer to put the string into it:

Applying the 'Move to Resource' refactoring

Once you accept the above settings, the string will be moved to the resource file:

And, of course, your code will be changed to use the resource string: