Move to Resource: Custom replacement variable?

When I use Move to Resource in the refactor menu, it replaces my string with a variable that represents that string. Is there any way to change how it does this? For example if I replace the string "Hello There", the current refactoring turns it into `Resources.sHelloThere`. I want it to change it to be `StringHelpers.FormatStringFromResources([productnamehere].GetString("sHelloThere"));` (where "productnamehere" is a static class that contains my clients name and I cannot disclose this name so just assume it is a static class name)

 

Is this possible?

Thanks!

0
2 comments

I think you can solve your problem with "Search wit pattern". You will find it in Resharpers Find menu.

 

Regards

Andreas

0

Hello!

 

Thank you for contacting us.

Please try to configure ReSharper | Options | Code Editing | Localization, hope it helps.

Thank you.

0

Please sign in to leave a comment.