Introduction
Do you need to localize your RESX files and don't want to open them one file at a time, clean them of unused keys, localize them etc., etc.? Then Resx2Xls is for you.
- Open Resx2xls. Click on "Create new Excel document...," select your Project Root and follow the wizard. Done!!
- Fill your Excel file with your localized key values or just send it to your translator.
- Now, do you want to create the localized RESX files from the filled Excel workbook? Open Resx2xls, click on "Generate resx files...," select your Excel file, click Next and then click Finish. Done!!
- Have you updated your project after your resource files were modified/added/removed/updated? No problem. Open Resx2xls, click on "Update your Excel document...," click Next, select your Project Root and Excel document and click Finish. Done!!
Thanks go to Manish Ranjan Kumar and his WizardBase control. It has helped me to give the application a more decent style.
Background
I was frustrated with copying my project resource files created in VS 2005, cleaning them of unused keys and then localizing them one file at a time. This tool should help you to just point and click at your project and obtain an Excel file filled with all of the strings of ALL of your resource files. After compiling the XLS with the translations, I wanted to convert all of the keys back into localized RESX files. I hope this helps!
Points of interest
I've had some problems loading resources with the ResxResourceReader
class. I've noticed that if you have an image resource stored in the resource file, the path of the image in the XML document is relative to the document itself, not the project. Opening from another directory, i.e. Resx2xls bin, I get a "cannot parse" path exception. This was solved by setting the BasePath
property of the resource reader with the path to the RESX file.
History
- 25-7-2007: Article edited and posted to the main CodeProject article base
- 5-7-2007: Added wizard
- 4-7-2007: First release