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

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

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!

History

2012-02-22 - Updated the binary setup. Small fix to allow translation even when no project is loaded.

2011-12-31 - Updated the binary setup. Adjusted the Microsoft Bing translation API binding to the new version 2. Please be aware that you now have to purchase a key from Microsoft to continue using Microsoft Bing Translate.

2011-12-22 - Updated the binary setup. Adjusted the Google translation API binding to the new version 2. Please be aware that you now have to purchase a key from Google to continue using Google Translate.

2011-06-14 - Updated the binary setup. Fixed an issue when adding new resources and letting them automatically translate. Optimized away some more pixels in the main window to have more height.

2011-05-14 - Updated the binary setup. The Excel export wizard now allows to directly send exported files to one or multiple e-mail receivers. This is done through our free Zeta Uploader service.

2011-04-20 - Updated the binary setup. Some minor adjustments to the automatic translation. The lists now only show those languages that the currently selected translation provider (Microsoft Bing or Google) actually support.

2011-04-02 - Updated the binary setup. Migrated back from .NET 4 to .NET 2 to reach a broader number of users (those who cannot upgrade to .NET 4). Reduced the download file size of the setup by 5 MB.

2011-03-14 - Updated the binary setup and the source download. Fixed an issue with translation through Bing Translator with unsupported languages.

2011-03-06 - Updated the binary setup and the source download. Added a right-click grid context menu item to delete the contents of a row for selected languages.

2011-02-08 - Fixed an issue with the new snapshot functionality when exporting only modified texts. Thanks to Colm.

2011-02-01 - Updated the binary setup and the source download. Added experimental support for the Excel export option "Only export texts that were modified since the last export". This required to store a kind of history of previous values. I solved it by automatically creating a companion SQLite database (*.zredb) for every project file (*.zreproj). It is all done automatically and in the background, just in case you wonder where the file comes from. If you have added your project file to SVN/CSV/GIT/TFS/etc. please also add the database file.

2010-08-08 - Updated the binary setup and the source download. Added the ability to choose the translation service when automatically translating resources. Currently, Google Translate and Microsoft Bing are supported.

2010-07-26 - Updated the binary setup and the source download. Added an option to export the comments column with to the Excel export wizard. Please note that I currently have no plans to add an import function of the comments column.

2010-07-20 - Updated the binary setup and the source download. Fixed an issue when exporting to multiple Excel document files. Added more warnings to the Excel export wizard. Updated to use the new Microsoft .NET Framework 4.

2010-07-10 - Updated the binary setup and the source download. Added "en-US" as the default neutral language if none is specified via the project settings. Simplified the right-click popup context menus in the project tree. Now, only the relevant options are displayed, depending on the type of item you right-clicked in the tree.

2010-06-12 - Updated the binary setup and the source download. Rewritten larger parts of the Microsoft Office Excel export and import routines.
The export wizard has more options resulting in a more flexible and more natural, real-world-aware way of letting Zeta Resource Editor generate your Excel files.
The import wizard is now capable of handling a broader range of input files in terms of column layouts. In addition an explanation dialog was added, describing how an Excel file should look like in order to import successfully.

2010-05-30 - Updated the binary setup and the source download. Added several new options to the Excel export wizard. Now you can generate multiple Excel files (based on file groups and/or languages) with one single export run.

2010-05-19 - Updated the binary setup and the source download. Allowed the Quick Access Toolbar to be persisted. Fixed an issue when editing multiple file groups. Thanks to user "Member 802361" for detecting and resolving the issue!

2010-05-14 - Updated the binary setup and the source download. Fixed an issue when editing multiple file groups. Thanks to user "Member 802361" for detecting and resolving the issue!

2010-05-10 - Updated the binary setup and the source download. Added the ability to hide completely translated rows. Added a color legend to the options dialog that shows the meaning of the special colors in the grid.

2010-03-16 - Updated the binary setup and the source download. Added support for coloring NULL values in cells.

2010-03-09 - I've added a "Donate 1 USD" button to the toolbar in the binary setup. You can hide this button in the program options (third ribbon tab page). I hope you don't mind.

2010-02-26 - Modified the binary setup. Fixed an issue when exporting and translating languages. Implemented grid filtering (but not yet persistent). Changed grid column headers caption from resource file names to language codes, which seem to be a more natural way of naming.

2010-02-24 - Modified the binary setup and the source code. Added support for configuring an HTTP proxy server for all outgoing HTTP requests like e.g. the translation service.

2010-02-21 - Modified the binary setup and the source code. It is now possible to edit not just one file group inside the grid but also multiple file groups at once. Simply double-click on the project or a project folder in the tree (This feature is currently in Beta stage; your feedback is very welcome!).

2010-01-15 - Modified the binary setup and the source code. Added ability to display the comments of the first resource file in the editor grid (read and write). Activate this option in the project settings Fixed issues with automatic translations. All changes were done by user "TheMegaLoser".

2010-01-14 - Updated the source download to match the latest binary setup. Due to its size, the source download is now hosted on Google Code.

2010-01-04 - Modified the binary setup, enhanced the Excel export and import to make it more usable for external translators/translations. See my weblog article for details and a screenshot.

2009-12-15 - Minor modifications to the binary setup, updated the translation functions to work with Google's recent change in their translation pages.

2009-10-31 - Minor modifications to the binary setup. As of request, I updated the source code download (at the top of this article). Please note that you need to have an installed license of the DevExpress WinForms components in order to successfully compile the sources.

2009-08-25Updated the binary setup again. Rewrote the language detection routine that detects a language from a file name. Now configurable through the project settings. Added function "Create new files" to create missing resource files for a complete project (or a project folder) with just a few clicks.

2009-08-08 Updated the binary setup again. Added the long-requested (including by myself!) ability to create new files from within Zeta Resource Editor:
This is done by copying from an existing file and replacing all the existing texts. Also included serveral minor bug fixes. Added the ability to show/hide the complete project tree panel (the left part of the main window) for better screen usage on smaller monitors.

2009-07-12Updated the binary setup again. Introduced what I call "Project Folders" - virtual folders that enables you to organize larger numbers of file groups into separate units to keep the project manageable. Also added move (up/down) and drag and drop to the tree.

2009-07-04Updated the binary setup again. Also updated the source download. Changes: Fixed reported bugs. Added first version of Microsoft Office Excel export and import (Your feedback is very welcome.

2009-06-27Updated the binary setup and fixed several bugs reported directly to me and below here in the forum. Added keyboard shortcuts to work again. Unfortunately the previous version broke the update mechanism, so you will get an error when clicking the "Update available" button. Sorry for that, I fixed it now.

This version is primarily a complete rewrite of the GUI. I hope you
like it! I throw out all standard Windows Forms components and used the
GUI components of DevExpress. The main reason for the rewrite was to
have a strong foundation for doing more complex UI stuff (like grid
filtering, exporting) in the future.

Changed the main window to use ribbons.

Added modern Windows Vista compatible icons.

Added a news area to the main windows. You can turn this of in the
application's options dialog window.

Added some initial spell checking functionality (configurable in the
project settings) with support of OpenOffice dictionaries.

2009-04-26Updated the binary setup again. Changes: Integrated Google Translation API calls to automatically translate from one language to another language (See the "Edit" main menu). Also included is a general-purpose translation window. Did some rather simple, but hopefully useful introduction screencasts.

2009-03-31Updated the binary setup again. Changes: The state of a translated file group is now shown both in the tree view as well as in the upper left corner of the editing grid.

2009-02-08Updated the binary setup again. Changes: Adjusted the display of file groups in the left tree. Enhanced and corrected the coloring in the grid. New color gray to show completely empty rows among all languages.

2009-02-08Updated the binary setup. Again some minor fixes in how the settings are stored. Added a German translation for the whole GUI, which is automatically chosen if you are on a German OS. Added project option for not storing empty resource strings (useful for fall back to the default language)

2008-12-29Updated the binary setup. Some minor fixes, adjustments of the generated group names and a neat little function to import a complete folder tree with all its resource files with one single operation.

2008-08-09 On commenter's request, I also published this project as a CodePlex project.

2008-04-11Maintenance release to fix a small bug when dealing with misformed RESX-files.

2007-06-24Added 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-17Maintenance 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-11Fixed 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.

Share

About the Author

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 has also teached programming to students at the local university.

In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.

First of all, great tool, thanks a lot!
I see that there is a logic to highlight with yellow/red the incompleted/invalid resource files. I wonder is there a way to find which files have not been translated at all, e.g. "en" and "fr" resource files are identical (could be marked as orange in the color legend)?

I have 11 resx files (eleven different languages), each file has about ten thousand entries. Saving them takes over ten minutes!
Even if I have only one file open, saving it takes about 30 seconds.
Any idea what to do?

Hi, I have tried generating ten thousand keys with randomized data into my files structure, and saving them with Zeta Resource Editor takes about 9 minutes on my dual-core E2160 with 4GB of RAM). I am using Windows 7 64-bit.

This is a great tool. Thanks very much for sharing it! Would you mind posting a sample config for log4net? Enabling logging would be very useful in troubleshooting problems that arise. Perhaps that could be added to the documentation on the zeta-resource-editor.com site?

Great tool, but I'm getting a couple of errors. The first occurs when I try to load my project:

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

I'm guessing that the cause is probably one of my nested directories exceeeding the allowable length, so I can work around it by changing my root directory. The project saves OK though and the error only occurs when you try to open it again, so maybe a check at save time might be useful from a usability perspective, as the project can't be opened later on when you might want to import translations

The second error is more of a problem though and occurs when I try to import from Excel - every time I try this I get the following error:

I've not been able to work out the exact cause as I can't compile the source in VS2010 (I get the same errors as a previous commentor), possibly because I don't have licenses for some of the 3rd party libraries it requires.

Thanks for your feedback. The 260 characters is actually a limitation of the .NET Framework. I've written a library Zeta Long Paths[^] to work around, but probably will not include it in the application since it would be way to complicated.

first of all I want to thank you for uploading this tool. I was looking for something like this and I was even thinking of making a similar one myself. So thanks for your effort! It looks great.

Let me now write some comments:

1- I tried to download the source code but I had some trouble with it. When I open the solution I get an error message "One or more projects in the solution were not loaded correctly. Please see the Output Window for details".

So a couple of projects in the "Website" solution directory are not loaded. And the output window says:

E:\Àlex\Visual Studio 2005\Projects\ZetaResourceEditor\RuntimeWeb\RuntimeWeb.csproj : error : Unable to read the project file 'RuntimeWeb.csproj'.
E:\Àlex\Visual Studio 2005\Projects\ZetaResourceEditor\RuntimeWeb\RuntimeWeb.csproj: The project file could not be loaded. Could not find a part of the path 'E:\Àlex\Visual Studio 2005\Projects\ZetaResourceEditor\RuntimeWeb\RuntimeWeb.csproj'.

E:\Àlex\Visual Studio 2005\Projects\ZetaResourceEditor\Web\ : error : Unable to open the Web site 'E:\Àlex\Visual Studio 2005\Projects\ZetaResourceEditor\Web'. The Web site 'E:\Àlex\Visual Studio 2005\Projects\ZetaResourceEditor\Web' does not exist.

Then when I try to compile I get 39 errors (I copy some of them here; I'm using VS 2010 although the folder is VS 2005)

2- I downloaded the compiled version and I had no problem using it. So thanks again!

3- A suggestion: I've read you're planning to add labels to classify/sort the tags. That would be great. In the meanwhile I have a suggestion. In fact I was using it myself to simplify the work with resx files and visual studio. The editor for resx files in visual studio admits a tag comment in each node. In addition, the resx editor allows you to order the grid alphabetically according to any column. So I wrote "similar comments" in "similar nodes" so that I could order the 'comments' column and then more or less group the nodes according to these comments. For instance, I wrote "CustomerUI: controls text" in all the tags that contained strings that were used to fill the 'Text' property of the controls in the CustomerUI form. Then when I wanted to translate these tags it was easy to group them together in the editor window. So in that way I could more or less classify the nodes. It is a very limited solution but it would be very easy for you to implement it (you should just add a column 'comments' to your grid). Of course that means that a node would end up having the same comment in all different resx files, but this should be fine because a node represents the same in all files, just in different languages).

First of all, congrats on this tool! It works very nice and it has great features.

Some things I noticed that might make the tool even better.
1. Translating to Chinese doesn't work. It enters "**** ArgumentOutOfRangeException: 'to' must be a valid language : ID=3641.V2_Soap.Translate.6E16922" in the Chinese column
2. Translation settings: The term "Reference column" is not very clear. Apparently it means the language of the neutral column, but that's also a project setting? I would expect this would choose from which column it is translated, but it always translates from the neutral column.
3. If the neutral column is empty, it is skipped in automatic translation. It would be nice to be able to "translate back", eg if I have entered Chinese text in the zh-cn column, translate it to english in the neutral column
4. In excel import it would be nice if resource files would be created for non-existing language resource files. Now values in columns are ignored (without warning) when there is no resource file for that language.
5. After import or create new file, the grid is not updated. (very minor issue, I just reopen the file)
6. It took me some time to figure out how to start. No problem for me, but it might cause some other people not to use it. I think it might be better if you would automatically create a new project and open the "automatically add file groups" dialog on the first launch.
7. Some naming is a bit odd. I would use visual studio naming, like "Include existing resources" instead of "Automatically add multiple file groups to project"

I can perfectly work without fixes, but just wanted to let you know.

And finally a question. The "Generate local resource" in visual studio 2008 asp.net webforms is pretty bad. Especially with custom controls it often doesn't work, need to restart visual studio all the time to reload custom dlls, meta:resourcekey properties are not always added and there's no quick way to convert static text to <asp:label Text='static text' />.
This is probably outside of the scope of zeta resource editor, but if you would know of any solution for this or include a "Generate local resource" option in zeta, would be fantastic!

I have found a small bug in DataProcessing.cs inside saveTable(...).
If the resource entry doesn't exist inside resx file and content wasn't changed(content=null) the current code just insert an empty value (if omitEmpty is false), but this is wrong and prevents the parent culture value to be loaded. You need to test this:

I downloaded the last version 2.1.0.73, but I have seen a couple of issues:

1) The text to be translated is not working, the result of a translation seems to be the key of the resource.
For example I have the key "OnlineDocumentation" with the value "Online Documentation" and for all the languages I am receiving the text "OnlineDocumentation". I'm trying to German, Spanish, French, Italian, Japanse, Korean, Portuguese, Russian, and Chinese. All of them has the result "OnlineDocumentation".

2) The status icon color (red/green/yellow) of the files of a project is turning red where the file content is not red as it was in previous version. I have a project with 12 files and all of them where "green" but now, only updating to this release, most of them are in "red" state.

Because of the first issue I had to uninstall the version 73, and installed 72 instead.

I reinstall the 2.1.0.76 version - add the es-ES dic again
now i am getting this error :
Column 'FileGroup, Name' is constrained to be unique. Value '2002288150, invalid translation language pair' is already present.

I'm using version 2.1.0.72.
The status of resources in treeview (in front of name) is not the good one.
I have 8 file groups (with 3 files in them .resx/.en/resx/.fr.resx).
On the 8 only 2 are in green, the others are yellow.
But when I open the yellow ones, all translations are done, and the status in the tab is green.