Products
Technologies

Developer resources

LocaleManager - a practical tool to manage resources files of different locales for Flex and .NET

Avg. Rating 5.0

Problem

My project already has several locale folders. The .properties files in base locale en_US folder keep on changing as development goes and it is hard to keep the files in other locales in Sync.

Solution

Developed a software tool to manage locale files.

Detailed explanation

It is a standalone application that runs on Windows and requires .Net framework on the computer.  It is a C# implementation. 

The latest build can be downloaded from code.google.com/p/localemanager/.  The C# source codes are also available there just in case if anybody is interested.

This software assumes that users follow the common practices for locale folders: use a separate folder for each locale. So, they normally look like:

   locale-
           |--- en_US - resource files in English
           |--- de - resource files in German
           |--- fr - resource files in French

It is very easy to use the locale manager.  Just follow the screen captures:

 

  1. Start the program. Then, select the base locale directory, e.g., en_us as in screenshot 1.
  2. After clicking OK, the base locale name will be shown in red color on the dialog. Also, the sibling sub-directories will be displayed in the list box on the left as the existing locale. As I am using Subversion, the svn directory also shows up, and that shouldn't be selected as a target locale. See screenshot 2.
  3. After selecting the locales to work on, click Load and the worksheet will be shown. My test input files only have three lines, so it doesn't look impressive. This window is resizable. This worksheet form shows the resource name, its value in the base locale, and the values in the selected locales. It is very easy to see which ones are not translated yet.

The target locale file will be reorganized to use the same resource entries as in the base. Entries that exist in the base but are not in the target will be added to the target locale with a blank value. Entries that exist in the target but not in the base will be taken out and saved to a Mismatch_timestamp.log file located in the same folder as the EXE file.

Click Save Changes before closing the window, and changes made will be saved to the target file. The base file will not be touched.

The test input files I used only have 3 lines and the screenshot 3 doesn't look very impressive.  It actually works pretty well with large sized files.  When there are multiple files in each locale, the ComboBox can be used to select each file to work on them individually or work on all files at the same time.

Report abuse

Related recipes