RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Translating Resources Gets Simpler with the Localization Management Toolkit  : Page 4

The global reach of many applications means organizations must manage the process of translating and keeping track of thousands of resources. The Localization Management Toolkit (currently in beta form) simplifies the process.

Using the Toolkit's Web Interface
Global businesses often teams located all over the world to maintain their applications. It is not uncommon to outsource translation work and even development work. A Web application is a suitable solution to keep the translation process centralized and guarantee reach.

The Toolkit includes a simple Web application that allows users to update the values of the resources per culture and application. There are two main roles: developers and translators. Developers can delete resources or modify the text on the invariant culture values while translators can only update the values for cultures other than the invariant one.

To prevent unauthorized users from changing resources, you can modify the Web application to restrict permissions to users based on culture, application, and role. Figure 8 shows the Toolkit login screen. The Toolkit uses the Membership and Profile Provider in ASP.NET, which facilitates the process of creating users and assigning roles. In addition, using this provider will aid in adding features to the Toolkit in the future, such as a finer-grained role/permissions schema.

Figure 8. Login Page of the Toolkit Web Application: The application automatically detects the browser culture of the user logging in, as the two different versions in this figure show.
Figure 9. Working with Resources: Developers can delete or modify the wording of resources to be translated.
This Web application presents developers with an initial Web Form that lets them select an application to work on. Next, they select from a dropdown list containing a list of resource files associated with the application. After selecting a file, they see a grid showing the resources stored in the selected file (see Figure 9). Developers can edit the value of a particular resource for the invariant culture or delete that resource if it is no longer in use.

The Toolkit makes use of the ASP.NET's two-way databinding feature, using the ObjectDataSources property to bind data to the GridView and FormView controls used in the application.

The Web application is itself fully localized; a language selector allows end users to select a preferred culture.

Future Plans for the Toolkit
Despite the recent features added to Visual Studio 2005 to simplify localization, the IDE does not provide a notification mechanism that warns you when you need to regenerate a resource file because of page changes. The IDE should help synchronize pages with resources associated to those pages, notifying developers when the set of controls changes that those changes should be reflected in the resources. More often than not, resource files grow unnecessarily, because developers tend not to delete resources associated with controls that no longer exist on the page.

There should be automatic selection of the resource provider and a tool for configuring it, similar to the aspnet_regslq.exe tool for the Membership and Profile providers.

Basically, the Toolkit discussed in this article is intended as a management tool that centralizes and tracks resource files shipped to translators. When returned, the tool imports translated files back into the Toolkit database. This database approach supports creating reports of shipments and returns, keeps track of versioning, and simplifies resource management for multiple applications at the enterprise level.

We demonstrated how the Toolkit integrates with the automatic local resource generation in Visual Studio, and briefly discussed IDE extensibility. Finally, we suggested using the database schema proposed in this article and a Resource Provider Extension to store resources in a database as opposed to using satellite assemblies.

We hope this tool can help other developers and translators with the task of globalizing and localizing applications with Visual Studio 2005 and ASP.NET.

A Note from the Authors: Although the sample code download that accompanies this article contains the source code for the beta version of the Toolkit, we plan to deliver the final version—and will make it available here or in a future article when it's ready. In the meantime, we welcome any comments you might have about the beta version or reports about any problems you might find while using it.

Lizet Pena de Sola has eight years of experience in software development. She's an MCAD and MCTS in SQL Server 2005. She currently works as technical lead at Computer Aid Canada and is involved in the development of SmartClient applications.
Email AuthorEmail Author
Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date