Visual Studio Gives You Tooltip Support with Resource Files

For the past year or so I’ve been working on projects that have users who do not  use English as their primary language.  The users for the applications I’ve been working on actually live in Mexico while I’m up in the States.  I get a decent amount of my email in Spanish these days, but no, I’m definitely not a fluent speaker (Bing Translator helps some, at least enough for me to get the gist of what is being said).  Sadly, the main application I’ve been working on was modified from an existing application that was created in the States and the user interface is mostly in English.  While many of the users can read and speak English, in order to give them a better experience I’ve been trying to introduce some localization into the existing system.

I’ve added localization through the normal means of creating satellite assemblies in the application (it’s a web application) that have the English and Spanish versions of the text I need.  I then rely on the UI Culture value being passed from the browser and the .NET Framework does the rest, selecting the correct version of the string to display.  You can read more about localization in .NET for Web Apps on MSDN.

While working on a specific page I happened to notice something when I hovered over one of the statements that was assigning a text property to one of the localized string resources.

image

Interesting enough, the value for the Greeting string in the default (English) resource file is actually “Hello”.  So, Visual Studio is looking up the default value for this localized string and showing it to you as part of the tooltip.  That’s kind of nice.

I noticed this while working on VS 2010, but the image above is taken from a sample in VS 2008 so I’m not sure how long Visual Studio has been doing this.