New langconv tool for conversion of i18n file formats
florian at schaeferban.de
Sun Dec 30 23:36:31 UTC 2018
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 . When
running it without any arguments, usage instructions are shown.
The perl scripts at  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 , the classes are accompanied by unit tests (~80% coverage) and
here's the documentation: .
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 ( or ).
With my best wishes for 2019, see you,
: incoming+floscher/gradle-josm-plugin at incoming.gitlab.com (email to
this address creates an issue, hidden by default until I make it public)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the josm-dev