LDAPAdminDownload now


Multilingual support

Multilingual support

Since version 1.6 LdapAdmin supported translations but was still an ANSI application. The communication with LDAP server was done in UTF-8 as required by LDAP v3 protocol but internal string processing was ANSI. This means that only the current OS codepage as set in the OS options for current locale could be correctly displayed.

As of version 1.7 LdapAdmin supports Unicode thus allowing arbitrary characters to be simultaneously processed. It currently supports UTF-8 and UTF-16 in both little-endian and big-endian formats. The multilingual support is achieved by loading the external language files which are searched for on application start as set in program options. If language files are found the menu item for languages will appear under the tools menu item. The LdapAdmin language files are XML-based files with an llf extension (*.llf).

Translating LDAP Admin

The whole process of translating is straightforward and consists of translating of the strings in the llf file. Those files can be edited with any common xml or text editor but there is a translation tool to help you with. You can get the tool on the Ldap Admin download page.

The tool is organized much like a diff tools are. On the left side is a reference English file. You can use "Get from source" option to create this file from source code in which case you have to have a string resource drc file created by compiler in this directory or you can get the empty reference project for a current version from the LdapAdmin download page.

Upon loading of the reference file in an empty project the tool will create an empty language file on the right side (this is already so if you load the empty project). If you already have a language file and would like to update it you can load the file on the right side.

A note on loading of the language files: when you load the source file, new reference file will take place of an old one if there was one in a current project. When you load a language file on the right side a merge with the current data will occur. You may want to do this when you upgrade existing project with the new language files which contain additional strings in order to keep status information (i.e. translated, disabled, etc.) but generally you will want to load the existing language file and let the tool analyze it. In order to do this, you have to clear the right side before loading the language file first.

Once you have cleared and reloaded the right side a comparison with the reference data on the left side will occur and the data on the right side will appear color coded:

  • Red for those items which are contained in the old language file but are obsolete in the new version (they have been removed or renamed)
  • Green for new items which were added in a new version
  • Blue for those items that have not yet been translated
  • Neutral (black) for all items differing from the reference ones (this assumes that they have been translated)

All items which require attention will be marked with a '?' icon. You can use Ctrl-P and Ctrl-V or corresponding toolbar buttons to quickly move from one item to another. The right click on the item gives you a context menu with following options:
Accept as is
This option marks an item as accepted as it appears in the reference file. That means that the item doesn't need translation (like numbers or 'OK' button for instance) and will not be included in output file.
Removes an item from the list.
Disables the item. The item will not be included in output file.
Lets you enter replacement string.
Remove tag
Removes tag from an item. Effectively sets item in ok state meaning that it will be included in output file as displayed.
Mark as todo
Marks item as not yet translated.
When you choose to create output language file only items with status translated and status ok will be exported. All other items will be left out.

Adjusting controls

The main purpose of language file is to provide translated strings for multilingual support. But it can actually do a lot more. Through additional parameters you can control practically every aspect of visual appearance: from color to position and size of dialog components. For instance, by including tags left and top for a component you can control its position, with tags width and height its size. As example, we could change the height of the button (which is 25 by default) and set the property WordWrap to true to allow text to fold and fit a longer text within:
<component name=SearchBtn>
   <caption>This is a long text</caption>
This would produce a button with text displayed in two lines.

You can use this feature to gain more room for the text when the size of the control doesn't provide enough space for it. However, you have to take into account that, if you change the size of a component, you may have to relocate components to prevent overlapping. Future versions of the language tool may provide this feature with a visual editor but for the time beeing you will have to edit the file manually.

Copyright (C) 2012 Tihomir Karlovic & www.ldapadmin.org. All rights reserved.   Design by Alexander Sokoloff. Impressum
LDAP Admin