
Text Expansion: Layouts That Survive Translation
Translated text typically runs longer than English, and on IBM's averages for European languages, short strings grow most. Intrinsic sizing, the CSS traps, engineered truncation, and length as a contract with translators.
TL;DR: Text expansion in i18n is a layout problem before it is a translation problem. Translated strings typically run longer than English, and, on IBM's averages for European languages, shorter source strings are likely to grow proportionally more. This article treats length as a variable a component must be specified for: intrinsic sizing over fixed widths, an inventory of the CSS traps that break under translation, truncation as an engineered last resort, length as a two-way contract with translators, and the habits that make long and short renderings as routine to review as a narrow viewport.
English is the narrow case
Many interfaces are designed against English copy, and English text is typically very compact. The W3C's article on text size in translation, which reproduces guidance originally published by IBM, gives the shape of the problem for text translated from English into European languages: on IBM's averages, the shorter the English source string, the larger the likely proportional growth once it is translated, though the article cautions that this is not true for every string.
| English source length | Average length after translation into European languages |
|---|---|
| Up to 10 characters | 200% to 300% of the source |
| 11 to 20 characters | 180% to 200% |
| 21 to 30 characters | 160% to 180% |
| 31 to 50 characters | 140% to 160% |
| 51 to 70 characters | 151% to 170% |
| Over 70 characters | 130% |
Source: W3C Internationalization, "Text size in translation", reproducing IBM's average expected expansion rates for text translated from English into European languages. Verified 2026-10.
The short end of that table is where interfaces live. A four-letter English button label can need two or three times its width in another language. A long paragraph is likely to grow less in relative terms (about 130% of the source for strings over 70 characters, on IBM's averages for European languages), and it can reflow to absorb that growth, although the W3C article notes that paragraphs still raise layout questions, such as whether everything still fits above the fold and whether items that grow downward at different rates still line up. Paragraphs reflow. Chrome does not.
Contraction is the quieter sibling. Some target languages render a phrase in far fewer characters than English, and a layout tuned to look full with English copy suddenly looks hollow: a hero headline that wrapped elegantly onto two lines sits on one, and a card grid tuned for balanced text heights goes ragged. Expansion and contraction are one problem. Length is a variable, and the component either handles the variable or it handles one value of it.
Where text expansion bites is predictable, because it is exactly the compact chrome that designers pixel-fit to English:
- Buttons and call-to-action labels
- Tab labels and segmented controls
- Navigation items, especially horizontal top navigation
- Badges, pills, and status chips
- Table headers above narrow numeric columns
The reframe this article argues for: a component's text capacity is part of its specification. "This label area holds the English string" is an unstated assumption, not a spec. A component that is specified for variable-length text documents how it behaves when the string doubles, when it halves, and when a single word is longer than the box.
CSS for text you have not seen yet
The default posture that survives translation is intrinsic sizing: boxes sized by their content, with padding defining the space around the text, rather than widths copied from an English mockup. A button whose width comes from padding-inline around its label grows with the label. A button with width: 120px does not.
The traps are few and they recur. Each one looks fine in English and fails quietly in other locales.
Fixed widths on text containers:
/* Breaks: the label was measured in English */
.button {
width: 120px;
white-space: nowrap;
overflow: hidden;
}
/* Survives: size from content, cap only where the layout truly needs it */
.button {
padding-inline: 1rem;
min-inline-size: 6rem;
max-inline-size: 100%;
}Height-locked containers that clip a wrapped second line:
/* Breaks: a two-line translation is cut in half */
.card-title {
height: 1.5em;
overflow: hidden;
}
/* Survives: reserve rhythm with min-height, let content grow */
.card-title {
min-block-size: 1.5em;
}Absolutely positioned labels, which do not push their neighbors when they grow:
/* Breaks: the translated label overlaps the icon or runs off the badge */
.badge-label {
position: absolute;
inset-inline-start: 24px;
}
/* Survives: put the label in flow so growth moves its neighbors */
.badge {
display: inline-flex;
align-items: center;
gap: 0.375rem;
}Side-by-side pairs where one column's growth crushes the other:
/* Breaks: a long translated label squeezes the value column to nothing */
.row {
display: flex;
}
/* Survives: give each side a floor and let the row wrap */
.row {
display: flex;
flex-wrap: wrap;
gap: 0.5rem 1rem;
}
.row > .label { flex: 1 1 12rem; }
.row > .value { flex: 0 1 auto; min-inline-size: 6rem; }The min-content trap deserves a sentence of its own. By default, a flex item that is not a scroll container gets a content-based minimum size along the main axis; a grid item gets one in a given axis when it is not a scroll container and spans at least one track in that axis whose minimum is auto (as with auto, or 1fr, which implies minmax(auto, 1fr)), unless it spans more than one track there and any of them is flexible. That minimum is why a single long translated word can blow a column past its track. min-width: 0 (or minmax(0, 1fr) on a grid track) lets the item shrink so wrapping rules can do their job.
Wrapping is a policy, decided per component rather than inherited by accident. Paragraphs and card bodies should wrap freely. Buttons and single-line navigation degrade when they wrap, and that degradation should be a decision: either the component is allowed to grow to two lines with deliberate spacing, or the layout around it gives way (navigation collapsing into a menu earlier in some locales than others is a legitimate outcome). The CSS should state which choice was made, with explicit white-space and flex-wrap values, rather than relying on whatever the defaults produce.
Long unbroken words are the stress case that several languages ship by default. Compound-word languages such as German, Finnish and Dutch can produce single words longer than the box designed for them. overflow-wrap: anywhere lets the browser break a word that would otherwise overflow, and hyphens: auto produces better-looking breaks where the browser has a dictionary for the language. Hyphenation keys on the lang attribute: if the document claims the wrong language, or falls back to source content without updating its language metadata, the hyphenation dictionary is the wrong one. Truthful lang attributes are a layout dependency, not just an accessibility nicety.
Truncation as a designed last resort
When text does not fit, there are three responses, and the order matters:
- Reflow: let the layout grow. This is the default and should handle most cases.
- Rewrite: shorten the source string, so every locale starts from a tighter base.
- Truncate: cut the rendered text. This is last, because truncation deletes information the team paid to translate.
Truncation is legitimate in constrained chrome, dense data tables, and previews where the full value lives one click away. In those cases it is engineered, not improvised. The full value stays accessible, through a tooltip, an expandable row, or a detail view. The ellipsis is applied by CSS, using text-overflow: ellipsis or, for multi-line previews, the prefixed -webkit-line-clamp together with display: -webkit-box (or -webkit-inline-box) and -webkit-box-orient: vertical, not by slicing the string in JavaScript. (As of Nov 2026, the unprefixed line-clamp property is not available in current stable releases of Chrome, Edge, Firefox or Safari.)
/* A cell only truncates once its column cannot grow: fixed layout sizes columns without measuring cell content */
.data-table {
table-layout: fixed;
inline-size: 100%;
}
.table-cell-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}The reason to avoid string-slicing is not only that it ignores the rendered width. Cutting a string at a character index can split a grapheme cluster, the unit a reader perceives as one character, which in many scripts is several code points. A sliced accented letter, emoji sequence, or combining mark renders wrongly, for example as a letter without its accent, an orphaned mark, or a broken emoji sequence. If code genuinely has to segment text, it needs segmentation that understands grapheme clusters, which the platform's Intl.Segmenter provides; CSS truncation with text-overflow: ellipsis sidesteps the problem because the specification has the ellipsis hide whole characters, which it defines as grapheme clusters, at the end edge of the line (the first character on a line is clipped rather than ellipsed).
Where to cut is an information decision. End truncation suits prose and titles, where the beginning carries the meaning. Middle truncation suits identifiers, file names, and paths, where the distinguishing part is often at the end: two order references that differ only in their last characters become indistinguishable when both are cut at the end.
The review rule that keeps truncation honest: any component that ships truncation ships it as a decision recorded in the component's spec, with the accessible full-value path named. Truncation discovered in a locale after release is a bug, even when it looks tidy.
Length as a contract with translation
Length is negotiated between engineering and translation, in both directions.
Engineers state capacity. A maximum-length hint that travels with the message key, alongside the context metadata that tells a translator where the string appears, lets a translator choose wording that fits before anyone sees a broken layout. Translators state needs. Some concepts do not compress into some languages without losing meaning, and a translator who says "this cannot be said in twelve characters" is reporting a fact about the language, not being difficult. When that happens, the component gives way, the source is rewritten, or the capacity is renegotiated. Length limits imposed silently produce translations that fit and mislead.
In practice the capacity hint is a small piece of metadata stored next to the key, in whatever shape the catalog format supports for translator notes:
{
"checkout.submit": {
"message": "Place order",
"description": "Primary button at the end of checkout. Grows with its label; wraps to two lines on narrow screens.",
"maxLength": 24
}
}The description matters as much as the number. "Grows with its label" tells the translator the limit is soft and the layout will cope; a hard limit, such as a column header in a fixed-width data table, should say so and say why. A translator who knows which limits are soft spends their effort on the hard ones.
Source-string discipline is one of the cheapest layout tools available. Verbose English produces verbose everything, because every locale starts from the source. A button that says "Click here to continue to the next step" can say "Continue" in every language, and the expansion problem shrinks across every locale at once.
Character limits deserve an honest caveat. They are a proxy. Rendered width is the truth, and the same character count varies widely in width across scripts and fonts. The W3C article itself, in its comparison of translations of one short Flickr label, counts each Chinese and Korean character as two English characters in width because of the width of the glyphs involved, which is a hint about how loose the proxy is. Capacity hints are approximate, and verification has to be visual.
That visual verification does not have to wait for translators. Pseudo-localization, which pads and transforms the source catalog into a fake locale, exercises expanded strings in the real layout before any translation work begins, and it is the natural gate for whether components actually hold.
Habits that make expansion boring
The goal is for text expansion to stop being an event. A few habits get most components there.
Direction-agnostic layout is a one-sentence habit: use logical properties such as padding-inline and margin-inline-start instead of physical left and right, so components stay indifferent to writing direction. The right-to-left direction system itself, including the dir attribute, bidirectional text, and mirroring policy, is a larger subject that belongs to the RTL literature.
Vertical rhythm under wrapping: specify line-height and the spacing between stacked elements so that a two-line rendering of a one-line English label degrades gracefully. A label that wraps into the element below it is a spacing bug that only shows up in longer locales.
Icon-plus-label components are the recurring composite. Reserve growth room for the label, never bake the icon and text into one image, and let the icon stay aligned to the first line when the label wraps (align-items: start on the flex container is usually the one-line fix).
The habit that ties the rest together: review new components against a long-string and a short-string rendering as routinely as against a narrow viewport. Responsive design taught teams that width is a variable a component must handle. Length is a responsive axis too, and a component that has been checked at double length, half length, and with one oversized word has been specified for the text it will actually carry.