Click here to Skip to main content
6,306,412 members and growing! (19,828 online)
Email Password   helpLost your password?
General Programming » Macros and Add-ins » VS.NET Addins     Beginner

Useful ReSharper plugin for localization

By Alexander Nesterenko

This ReSharper plugin contains features that helps you for localization
C# 1.0, C# 2.0, Windows, .NET 2.0, ASP.NET, WinForms, WebForms, VS2005, Dev
Posted:26 Apr 2007
Views:57,645
Bookmarked:62 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
21 votes for this article.
Popularity: 6.45 Rating: 4.88 out of 5
1 vote, 4.8%
1

2

3
3 votes, 14.3%
4
17 votes, 81.0%
5

Introduction

This article describes plugin functions.

DT ReSharper Plugin roadmap

is available in the latest version
is partly available

  • Context actions
    • Move strings to resource
    • Replace string by property
    • Use System.String.Empty instead of ""
    • Use System.Environment.NewLine instead of "\r\n"
  • Highlighting
    • String literal is invalid
    • String could be moved to resource
    • String present in a resource
  • Refactoring
    • Move strings to resource
    • Move all strings from file(s) to resource
    • Move all strings from folder(s) to resource
    • Move all strings from project(s) to resource
    • Move all strings from solution to resource

Context actions

Move strings to resource

Move strings to resource by context action.

Replace string by property

If a string exists in project resource files, then use "Replace string by property" context action.

Use System.String.Empty instead of ""

For empty strings use System.String.Empty.

Use System.Environment.NewLine instead of "\r\n"

For string that contains \r and \n, use System.Environment.NewLine.

Highlighting

String literal is invalid

In the ReSharper -> Options you can set "Localization -> String literal is invalid" to "Show as error".

An unrecognized escape sequence marked by red wave.

String could be moved to resource

In the ReSharper -> Options you can set "Localization -> String literal could be moved to resource" to "Show as warning".

All strings underlined by wavy line.

Refactoring

Move strings to resource

You can move strings to resource by context action or main menu item.

First, you select the resource file and string name.

If the checkbox "Apply for all same strings in project {CurrentProjectName}" is true, then you can see all the same strings in this project.

Current string does not present in this list.

String placed to resource file after action.

and string literal replaced by property.

If checkbox "Keep modified files open" is true, then you can undo this action.

History

All changes

Visit DT ReSharper plugin homepage.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Alexander Nesterenko


Member

Occupation: Software Developer (Senior)
Location: Belarus Belarus

Other popular Macros and Add-ins articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 107 (Total in Forum: 107) (Refresh)FirstPrevNext
Generalwww.safedevelop.com - I am confused PinsitebuilderUwe Keim11:12 18 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko23:47 19 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinsitebuilderUwe Keim4:16 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko5:23 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko8:22 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinsitebuilderUwe Keim11:18 22 Aug '07  
GeneralRe: www.safedevelop.com - I am confused PinmemberAlexander Nestrenko23:25 22 Aug '07  
GeneralResharper dont see this plugin Pinmembertecnic5:38 6 Aug '07  
GeneralRe: Resharper dont see this plugin PinmemberAlexander Nestrenko23:36 7 Aug '07  
GeneralRe: Resharper dont see this plugin Pinmembertecnic9:16 8 Aug '07  
GeneralRe: Resharper dont see this plugin PinmemberAlexander Nestrenko20:58 8 Aug '07  
GeneralReSharper 3.0.2 PinsitebuilderUwe Keim23:40 22 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko0:21 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinsitebuilderUwe Keim0:24 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko0:30 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko0:31 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko0:37 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinsitebuilderUwe Keim0:40 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinmemberAlexander Nestrenko2:53 23 Jul '07  
GeneralRe: ReSharper 3.0.2 PinsitebuilderUwe Keim2:54 23 Jul '07  
News[ANN] Version 0.9.23 for R# 3.0.1 is available PinmemberAlexander Nestrenko23:49 9 Jul '07  
GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is available PinsitebuilderUwe Keim6:55 10 Jul '07  
GeneralRe: [ANN] Version 0.9.23 for R# 3.0.1 is available PinmemberAlexander Nestrenko20:09 10 Jul '07  
News[ANN] New version for R# 3.0.1 is available PinmemberAlexander Nestrenko5:05 7 Jul '07  
GeneralRe: [ANN] New version for R# 3.0.1 is available PinsitebuilderUwe Keim0:08 8 Jul '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 26 Apr 2007
Editor: Deeksha Shenoy
Copyright 2007 by Alexander Nesterenko
Everything else Copyright © CodeProject, 1999-2009
Web13 | Advertise on the Code Project