tags:

views:

72

answers:

2

Are there any tools for locating all the strings that I've to Internationalize? My app is already "partially" designed for Internationalization support. However I want to make sure that there arent' any hardcoded string within my app.

Regular expression search didn't help a lot as trying to find "***" returns every aspx page.

Are there any tools to do this?

+3  A: 
John Kugelman
You need to make use of the [Localizable] attribute on your properties to get the best out of FxCop.
Mark Heath
I don't see the "Do not pass literals as localized parameters" option in FxCop. Moreover, how can I use this on a ASP.NET project?
Mugunth Kumar
@Mugunth: Web Application Project or Web Site Project (former created through new project, latter through new web site). For a Web Application Project FXCop is available in project settings under Code Analysis.
Richard
+1  A: 

Netbeans and Eclipse support this out of the box. I think it is even enabled by default. I don't know about Visual Studio, but I'd expect that it offers such functionality.

In eclipse and with java it works like this: Whenever the integrated compiler sees a string literal it issues a warning unless the string literal is marked with a //$NON-NLS-1$ comment.

In Netbeans it is mostly the same but you mark non-translatable string literals (regexes, SQL, ...) with NOI18N.

bbuser