I was asked via email this morning about the changing locale.xml file format between build 223 and build 224 of Keyman Desktop.  I had meant to write an update on this blog for my previous post about the file format – so here it is.

We reworked the locale.xml file format in build 224 to make it more consistent and eliminate some issues with extensibility.  I believe the new format is more logical – here’s an overview:

<?xml version="1.0" encoding="utf-8"?>
<Locale>
  <String Type="PlainText" Id="S_ShortProductName">Keyman Desktop</String>
</Locale>
<Dialog Id="DownloadKeyboard" Width="600" Height="400">
  <footerheight>40</footerheight>
</Dialog>

Each string has a type of PlainText, HTML, or FormatString, according to how it is used.  PlainText cannot contain markup of any kind; HTML can.  FormatStrings are used mostly in dialog boxes and other messages, and cannot contain markup, but often contain parameters such as %0:s or %1:d.  These parameters can be put in any order in the output string – and can even be repeated.

We also have some new information – each HTML-based dialog in Keyman Desktop Configuration has an entry in the file that specifies its pixel width and height, and optionally some internal dimensions as well.  In the example above, the footerheight for the DownloadKeyboard dialog is given as 40 pixels.

That’s all there is to the format…  Of course the new file format is wonderful and is going to solve the world’s problems, but for anyone who already did a translation, that’s not going to make them happy!  (Vincent?)

So, I wrote an XSLT template to translate the build 223 format to build 224 format.  The template and some wrappers to execute it are available at: www.tavultesoft.com/support/files/.  There are two wrappers for the template (or you can use your own favourite XSLT processor):
* An IE only web page – convertlocale.html  (uses ActiveX to access Msxml2.DomDocument)
* A Windows Scripting file – convertlocale.js

To run convertlocale.js, start a command prompt and type:

cscript [/nologo]
convertlocale.js <infile.xml> [<outfile.xml>]

If no outfile is given, then the output is written to stdout.

If you have any issues with the conversion, please let me know.

Categories: Developing Keyman

0 thoughts on “Translating the Keyman Desktop UI – again!”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Developing Keyman

Keyman Update for 5 June 2026

This release cycle highlights the growing impact of Keyman through a community testimony, introduces new keyboards for Hanifi Rohingya, Madurese, Punjabi, and Bayot, and includes updates for Keyman for Windows and Web. Welcome five new contributors to the project, and Keyboard App Builder 14.2 releases with usability improvements and bug fixes, the Keyman community continues to expand support for digitally disadvantaged languages. Which update or new keyboard are you most interested in exploring?

Developing Keyman

Keyman 19 roadmap update

The March 2026 Keyman 19 roadmap gets a candid mid-year update. An internal review found 363 open issues still assigned to v19. ARM Windows and Mac installer support are on track; CLDR mobile keyboards are postponed. The team is down to 9 — contributions and donations are welcome.

Developing Keyman

Keyman Update for 22 May 2026

Keyman 19 alpha (229–236) lands with caps lock and Linux Debian fixes. New keyboards for the Zou and Mising communities join the library, and Lac Viet v3.0 gains Zhuang support. Two new contributors welcomed.