5,447,640 members and growing! (20,215 online)
Email Password   helpLost your password?
Languages » C# » General     Intermediate

RESX to XLS conversion for multi-language support

By Marco Roello

Easily convert your RESX projects files to Excel and back to localized RESX
C# 2.0, C#, Windows, .NET, .NET 2.0VS2005, Visual Studio, Dev

Posted: 4 Jul 2007
Updated: 25 Jul 2007
Views: 13,578
Bookmarked: 30 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
6 votes for this Article.
Popularity: 3.52 Rating: 4.53 out of 5
0 votes, 0.0%
1
0 votes, 0.0%
2
0 votes, 0.0%
3
1 vote, 16.7%
4
5 votes, 83.3%
5

Resx2Xls ScreenShot

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.

  1. Open Resx2xls. Click on "Create new Excel document...," select your Project Root and follow the wizard. Done!!
  2. Fill your Excel file with your localized key values or just send it to your translator.
  3. 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!!
  4. 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

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

Marco Roello



Occupation: Web Developer
Location: Italy Italy

Other popular C# articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 9 of 9 (Total in Forum: 9) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralFantastic!memberuswebpro23:50 18 Aug '08  
GeneralOttimo lavoro...memberNicola Costantini5:59 21 Jan '08  
GeneralExcellent workmemberEthan Huang0:13 20 Sep '07  
GeneralCOMException: Old format or invalid type librarymembermarco vervoort22:18 10 Jul '07  
GeneralRe: COMException: Old format or invalid type librarymemberKerdal8:18 17 Jul '07  
GeneralRe: COMException: Old format or invalid type librarymembermarco vervoort22:16 17 Jul '07  
GeneralRe: COMException: Old format or invalid type librarymemberuswebpro23:09 18 Aug '08  
Generalresource editor with multi language supportmemberedwin_vermeer3:39 10 Jul '07  
GeneralRe: resource editor with multi language supportmemberMarco Roello22:36 22 Jul '07  

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

PermaLink | Privacy | Terms of Use
Last Updated: 25 Jul 2007
Editor: Genevieve Sovereign
Copyright 2007 by Marco Roello
Everything else Copyright © CodeProject, 1999-2008
Web20 | Advertise on the Code Project