|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
|
Announcements
Chapters
Services
Feature Zones
|
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
(Please see the bottom of this article for the latest updates) IntroductionThis is a small utility application that enables you to edit string resources from multiple different resource files together inside one single data grid. BackgroundWhen 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 doAdd 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.
2.) Start Zeta Resource Editor and open the resource filesNext, simply start Zeta Resource Editor and open the files you want to edit in parallel.
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 compileFinally 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.
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:
Then select the apropriate files and they will appear in the project list:
Simply double click the file group to edit the files inside the grid in Zeta Resource Editor. EpilogOther ToolsI 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 ToolBeside 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
History
|
||||||||||||||||||||||