Quantifable internationalization with xlf-analyze

08.08.2025

A CLI tool born from a simple question: how much of an Angular application is translated?

Introducing xlf-analyze, an npm package used to get insight into XLIFF files. See an example run below:

Screenshot of console running xlf-analyze script

As I stated in the previous article about best practices, i18n is where business meets development. Localization services cost, and it’s good to make informed decisions. This utility helps with just that, telling you about state of your language versions:

CLI FTW

Writing a command line application is honestly a great break from typical workload. You are not constrained by a framework or test coverage. You can get to ship self-contained, useful piece of software in hours. It’s also quite an exercise in API design - in this context, all you have is flags and arguments, so they are better well laid out and documented. Heck, you can even try a completely different programming language.

Interesting fact: despite xlf-analyze handles XML, I chose not to rely on dedicated library, just to introduce bugs minimize dependencies. The readline proved to be working, and subjectively fast.