Introduction

This is my first article so bear with me I want to share this with you because I think ResxWriter has some very nice functionality and some cool features. A break down:

Generates .resx files using ADO.NET and an Excel spreadsheet.

Fully customizable.

Settings are per machine user.

Clean uninstallation, with launcher.

ResxWriter is a .NET tool that can read Excel spreadsheets with data used for translation, and convert this data into separate .resx files.

Recently, I was working on an ASP.NET application that needed to have full translation for all static text. We used .NET resource files (.resx) and things were moving along just fine. Updating the text, however, was another story. Using Visual Studio to manually update the .resx files was cumbersome to say the least. Formatting was a pain if you used the IDE, although formatting the XML was an option…

Instead I decided to write an app that would take data from an Excel spreadsheet and generate the .resx files. This allowed our translation staff to use a program they are familiar with, as well as share the files for others to work on.

Reading the Excel File

Suppose you had the following data in a spreadsheet:

ControlName

English

French

BtnHello

Hello World!

Bonjour Monde!

LblHello

Hello World Again!

Bonjour Monde encore!

ResxWriter can extract the data from each column and create .resx files. Any number of columns can be used, and the application can be fully customized.

All settings in this app are specific to the current user, saved at /Documents and Settings/{User name}/Application Data/... This conforms closely to Microsoft's recommendations, and lets each user have their own experience and preferences.

I hate it when an application uninstalls but doesn't remove all files it was using. So, I made an app that cleans up for a true uninstallation. It essentially deletes all directories and files in its current location. Also, the only method (through Visual Studio) to create an uninstallation icon was to create a Uninstallation Launcher. In the source code, the launcher finds the product key used by the MSI file. This triggers the repair or remove screen, and allows uninstallation.

(These are both included as separate projects in the Solution file.)

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.

Comments and Discussions

As stated in Brady's post however, it would be really useful to have a facility for importing existing resx files into Excel, where they could then be modified/finished off before exporting back to native resx format.

thanks for your comments, cliff.
one of the reasons i didn't even attempt this was because in the original excel files we were using, there were many extraneous columns, and since i wasnt interested in this data (from the .resx perspective), i knew i wouldnt be able to recreate the same spreadsheet in this manner.

as far as simply collecting a group of .resx files and merging their content into a spreadsheet- sounds fun! i appreciate the idea, and will definitely look into implementing this (as time permits )

thanks again for the feedback and suggestion!

//--------------------------//
The following sentence is true.
The previous sentence is false.