New langconv tool for conversion of i18n file formats

Florian Schäfer florian at
Sun Dec 30 23:36:31 UTC 2018

Hello everyone,

I would like to announce a new command line tool that can convert
between the i18n file formats *.mo (used by gettext) and the custom
*.lang file format (used by JOSM). It is named quite unimaginatively
`langconv` (if you know some really catchy name for this, let me know 😉).

`langconv` is part of the `gradle-josm-plugin`, both are released
together and share the same version number (they are basically two
overlapping parts of one project). Basically the classes at the heart of
`langconv` already convert *.mo files to *.lang files for a while now as
part of the `gradle-josm-plugin`. What's new is that this is now
packaged as a command line tool into a small standalone runnable *.jar
file and it can convert both directions (*.mo to *.lang, *.lang to
*.mo). `langconv` also displays statistics on how many strings are
translated into each of the languages in a directory.

The *.jar file containing `langconv` can be downloaded from [1]. When
running it without any arguments, usage instructions are shown.

The perl scripts at [2] can do a similar thing (convert from *.po files
to *.lang files), but I hope that this tool can especially help when you
have *.lang files and you want to either analyze their content (how many
and which strings are in it) or convert them to other formats. Also the
classes should be easier used from Java programs, just include
`langconv` as a library to read or write *.mo files and *.lang files.
The source code can be found in the `langconv` and `i18n` subdirectories
of [3], the classes are accompanied by unit tests (~80% coverage) and
here's the documentation: [4].

This might hopefully be of some use for some of you, so I hope you can
forgive me this shameless promo for this project 😉. Feel free to reach
out for any feedback about `langconv`, either via mail or in the issue
tracker ([5] or [6]).

With my best wishes for 2019, see you,

[6]: incoming+floscher/gradle-josm-plugin at  (email to
this address creates an issue, hidden by default until I make it public)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the josm-dev mailing list