Text expansion in 55 languages
16/100
15px180px
Translating into 55 languages…
Method
- Translations
- Uses machine translation from Google Translate to estimate target string length across 55 languages.
- Sample strings
- Built-in presets are pre-translated and reviewed (55 rows per preset, including 29 manual corrections for ambiguous verbs such as “Save”). Custom strings are translated live.
- Width
- Measures horizontal width in pixels using
canvas.measureTextafter the selected webfont loads. Scripts not covered by the selected font fall back to the system font stack. - Ink height
- Computes painted glyph height from
actualBoundingBoxAscent+actualBoundingBoxDescent. - Characters vs width
- CJK ideographs render roughly twice as wide per character as Latin letters, so character count alone does not predict pixel width. Scripts with stacked diacritics (such as Thai and Devanagari) also increase vertical ink height by 20% to 40%.
- Box fit
- Segments words with
Intl.Segmenterand truncates at grapheme cluster boundaries so combining marks are never split. - Source
- Length expansion allowances follow the W3C Text size in translation table and the text expansion chapter.
Related: Text expansion chapter · Budget estimator (prices the translation)