Back to blog

i18n text expansion

This page provides the text expansion required when translation from a language to another, following the concept presented in this article from IBM. These statistics are based on the translation of the KDE project. You can comment on this blog page or on this linuxfr thread.

Source: Translation:

More explanations

To give you an example, «Cancel» can be translated in German to «Abbrechen», so you will need more room for the translation to fit in a user interface or a document. But if your base text is «Abbrechen», you will not need any expansion (0%) if you need to replace the text by «Cancel».

In the table above, the texts are grouped by length (in characters in the source language). For example, all the texts between 1 and 10 characters falls in a common statistical category. For each category, you will also have the number of texts available for both languages and on which these statistics were based.

Finally the expansion statistics can be read this way: it will give you the amount of expansion you need so X percent of the translations fit. For example, if you read «for 80%: 18%», it means that reserving 18% of additional space in your interface/document would make 80% of the translated texts fit (and that 20% of the translations having such a length would overflow).

The length required for a text is not computed in characters (no no), but in pixels. The fonts used are these ones. They are the ones choosed by Fontconfig on my machine (Kubuntu 13.04 with many languages installed) for a «sans-serif» font. By the way, I wonder why I have a specific font in Japanese and not in Chinese…

If you want to have fun by yourself, you can download the stats in the form of a SQLite file or a bziped text file. You can also download the python script that produced this data (far from being the greatest code ever, but it's kind of a one shot) and the launcher shell script.