5,286,006 members and growing! (19,639 online)
Email Password   helpLost your password?
Web Development » ASP.NET » General     Intermediate License: The Code Project Open License (CPOL)

Zeta Resource Editor

By Uwe Keim

A small utility application to edit string resources inside multiple resource files in parallel.
Windows, .NET, Visual Studio, ASP.NET, Dev

Posted: 22 Oct 2006
Updated: 10 Apr 2008
Views: 51,381
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
29 votes for this Article.
Popularity: 6.78 Rating: 4.63 out of 5
1 vote, 3.6%
1
1 vote, 3.6%
2
1 vote, 3.6%
3
1 vote, 3.6%
4
24 votes, 85.7%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article


Click to zoom

(Please see the bottom of this article for the latest updates)

Introduction

This is a small utility application that enables you to edit string resources from multiple different resource files together inside one single data grid.

Background

When translating the resources of a .NET application into other languages, the biggest and most difficult task for me was to translate string resources:

The recommended way (at least what I know) is to create one single .RESX file for every language you want the strings to be translated to. I.e. one "Resources.resx" for neutral/English, one "Resources.de.resx" for German, one "Resources.fr.resx" for French, etc.

Since I had to duplicate the resource keys into each RESX file, I often did not manage to keep the resource keys synchronal among all RESX files.

This is where the idea for this tool came up: Take all RESX files, merge their resource keys and display the resource values side by side in one editable data grid.

How to use the tool (simple version)

1.) Create your resource files in Visual Studio .NET 2005 as you usually do

Add a resource file for each language you want to support and place them in the "Properties" folder of your project.

Keep the naming schema "Resources.<language>.resx", e.g. "Resources.fr-ch.resx" for Swiss with French language. The following screenshot is an example for English and German.


English and German language resources

2.) Start Zeta Resource Editor and open the resource files

Next, simply start Zeta Resource Editor and open the files you want to edit in parallel.


Opening two resource files and load them into Zeta Resource Editor

3.) Edit the resources and save them


The main window of Zeta Resource Editor

You could either edit the cells in the grid directly by selecting and pressing F2 or, for a better overview, select a cell in the grid and then edit the details in the details view at the bottom of the window.

4.) Save and compile

Finally save the resources in Zeta Resource Editor and compile your solution inside Visual Studio .NET 2005/2008.

How to use the tool (enhanced version with projects)

Starting march 2008, I added the concept of "projects". Projects are XML files with the ".zreproj" file extension that store 1..n so called "file groups" of RESX files that you want to edit together.

The idea is that you usually have a Visual Studio .NET solution that has multiple projects with multiple RESX files. Instead of opening them one by one inside Zeta Resource Editor, you once create a project inside Zeta Resource Editor and all the resources files you want to edit.

Later you simple open the Zeta Resource Editor project and double click the individual files to edit them.

To use projects, simply select Create New Project from the Projects main menu.


Dialog to create a new project

Once you have created a new project, it is being displayed in the main window on the left side. Right click the root node and select Add file group to project to add a new file group with multiple RESX files to the project:


Right-clicking the project to add files

Then select the apropriate files and they will appear in the project list:


Project list with one added file group with two individual files

Simply double click the file group to edit the files inside the grid in Zeta Resource Editor.

Epilog

Other Tools

I must admit that I am not an expert regarding translation/localization/globalization tools.

Doing lots of Internet searches, trying different tools, all of them seems to do their own kind of hand algorithms and behaviors.

But what I wanted was to do it my way, respectively the way that Visual Studio .NET 2005 does it.

So I do hope my approach isn't that naive but rather a small pragmatic tool to aid me (and hopefully others) managing the hassles of translating string resources.

If you do know other tools, preferably free ones, that do the same or even better than this one I presented you here, please post the hyperlinks below in the comments section!

Some tools and resources I found to be rather good are:

The current state of the Tool

Beside small test applications, we did not use the tool extensively.

We developed this tool for the upcoming releases of our applications Zeta Producer version 8 (a windows-based Content Management System) and Zeta Helpdesk (a ticket-management system).

Although I think it is ready-to-use, the main reason why I already released it was to give other developers the chance to use it and to provide a lot of feedback to me for improving the application.

So please keep the feedback coming :-)!

Planed enhancements

  • The ability to export to and import from Microsoft Excel documents.
  • Your suggestions here

History

  • 2008-04-11
    Maintenance release to fix a small bug when dealing with misformed RESX-files.
  • 2008-03-27
    Added the concept of "projects". Added installable setup. Created new website and online manual.
  • 2007-06-24
    Added searching/finding (Ctrl+F) and "Find next". Added coloring cells: The read-only column zero is colored blue, except when the number of formatting placeholders (you known these "{0}", "{3:F2}", etc. don't match between the languages; then the first column becomes red. An empty cell gets colored yellow to easier spot things to translate.
  • 2007-06-17
    Maintenance release. Adding small convenience functions like a LRU list. Fixing some minor UI bugs. Please note the this is not yet the major update to expect in the future that will include all your great suggestions from the comments below.
  • 2007-01-11
    Fixed a bug when saving/loading. Thanks to Rudolf Jan Heijink for telling us! In fact, Markus wrote several large parts of the loading/saving engine new.
  • 2007-01-01
    Added modifications when writing the files, as suggested by Jens Buchta.
  • 2006-11-16
    Markus Klieber fixed this bug found by Bo E. Pedersen. Thanks to both!
  • 2006-10-24
    Fixed a bug that occured when comments were present in the resource files. Thanks to Crispin Horsfield for pointing this out.
  • 2006-10-22
    Initial publishing of this article. The core engine of the application was developed by our current trainee Markus, the GUI details and the finishing and packaging were done by myself.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Uwe Keim


Sitebuilder
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He is also teaching programming to students at the local "Fachhochschule".

In his free time, he does climbing, running and mountainbiking. You can watch him most of the day (and probably night) programming.

Some cool, free software from us:

Zeta Producer Desktop CMS
Intuitive, completely easy-to-use CMS for Windows.

Zeta Helpdesk
Open Source ticket- and helpdesk software for Windows and web.

Zeta Uploader
Easily send large files by e-mail. Windows and web client available.

Desargues
Innovative, lean and neat calculator for Windows. You never want to use Calc.exe again!
Occupation: Software Developer
Company: zeta software GmbH
Location: Germany Germany

Other popular ASP.NET 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 25 of 72 (Total in Forum: 72) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralSmall bug + feature suggestionmemberDan Avni2:19 29 May '08  
Generalopen/compile with Visual Studio 2005memberch_cu25:06 2 May '08  
GeneralRe: open/compile with Visual Studio 2005sitebuilderUwe Keim5:08 2 May '08  
GeneralRe: open/compile with Visual Studio 2005memberChristian Calderon17:53 1 Jul '08  
GeneralVery handy indeed!memberwsiksma5:16 17 Apr '08  
GeneralRe: Very handy indeed!sitebuilderUwe Keim5:20 17 Apr '08  
GeneralVery coolmemberPaul Conrad16:50 28 Mar '08  
GeneralRe: Very coolsitebuilderUwe Keim20:16 30 Mar '08  
GeneralThanks. This is very usefulmemberBert delaVega6:22 28 Mar '08  
GeneralRe: Thanks. This is very usefulsitebuilderUwe Keim6:24 28 Mar '08  
Generalbug - with fixmemberglennb12:12 18 Mar '08  
AnswerYet another toolmemberGeorge_Saveliev8:55 6 Mar '08  
GeneralASP.NET Resx EditormemberCrocmort6:11 3 Mar '08  
GeneralAdd multi-language support for the projectmemberdubbele onzin10:36 5 Nov '07  
GeneralRe: Add multi-language support for the projectsitebuilderUwe Keim19:02 5 Nov '07  
GeneralsuggestionsmemberDan Avni22:44 20 Oct '07  
GeneralSuggestionsmemberrjison90005:55 11 Sep '07  
GeneralAnother BUG [modified]memberKirill Metrik3:46 5 Sep '07  
GeneralRe: Another BUGsitebuilderUwe Keim4:26 5 Sep '07  
GeneralLicensing?memberluthar2000009:03 5 Jul '07  
GeneralRe: Licensing?sitebuilderUwe Keim9:26 5 Jul '07  
GeneralClosing files mini-mini buglikememberMassamino23:18 19 Jun '07  
GeneralRe: Closing files mini-mini buglikesitebuilderUwe Keim23:50 19 Jun '07  
GeneralSuggestions!memberMortdk9:57 19 Jun '07  
GeneralRe: Suggestions!sitebuilderUwe Keim10:01 19 Jun '07  

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

PermaLink | Privacy | Terms of Use
Last Updated: 10 Apr 2008
Editor:
Copyright 2006 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2008
Web09 | Advertise on the Code Project