Skip to content
Locale Lab

Chapter 02·Common UI Defects·~6 min·

Text Expansion and Layout Budgeting

Translated text changes length in characters, UTF-8 bytes, and rendered pixels. User interface containers must budget horizontal width and vertical line height across scripts.

W3C expansion tablecharacter limitslayout

Overview

Translated strings rarely match the bounding box of English source text. European languages often expand horizontally, while Brahmic and Southeast Asian scripts require additional vertical line height. Fixed pixel dimensions cause clipping and overflow.

Core rule

Budget +100% to +200% extra width for English strings under 10 characters and +30% for strings over 70 characters, and use flexible containers that wrap and grow.

Specification note: Horizontal width and vertical height vary independently. Thai often renders narrower than English while requiring significantly more line height for stacked diacritics.

Failure mode

Interface mockups often size buttons and labels to fit English copy. The English string “Add to cart” has 11 characters. The German translation “In den Warenkorb” has 16 characters (+45%), the Portuguese “Adicionar ao carrinho” has 21 characters (+91%), and the Simplified Chinese “加入购物车” has 5 characters (-55%).

Short strings expand by the largest percentage because translated articles, prepositions, and grammatical inflections add a high proportion of characters. Fixed-width containers truncate labels or overflow into adjacent icons and padding.

Stakeholder Teaching Aid & Novice Guide
Cross-functional alignment tool

Translated strings expand or contract significantly compared to English. Containers with fixed widths truncate copy, clip accents, and break layouts.

Business stakes & user risk

Truncated action buttons (such as checkout and signup buttons) reduce conversion rates. Overlapping text destroys visual hierarchy and makes applications look untrustworthy to international customers.

Rule of thumb

Reserve 100% extra horizontal width for short strings under 10 characters, and 30% extra for longer paragraphs.

The Novice Trap vs. Production Standard

Contrast the intuitive assumption with the architecture required for global releases.

Naive mental model

“A button designed to fit English 'Save' or 'Add to Cart' will fit in any language.”

Naive approach: Fixed CSS width

<button style={{ width: "110px", height: "36px" }}>Add to Cart</button>

Defect:In German, 'In den Warenkorb' (16 characters) overflows the 110px boundary or truncates to 'In den Wa...'.

Production standard

Short labels expand by the highest percentage. German, French, and Portuguese frequently double the width of concise English phrases.

Production standard: Flexible container sizing

<button className="min-w-[120px] max-w-full px-4 py-2 text-wrap">In den Warenkorb</button>

Benefit:Container expands with content, allows wrapping if necessary, and preserves touch targets across languages.

Cross-Functional Review Questions

Questions for product managers, designers, engineers, and testers to ask during sprint reviews.

For DesignQuestion #1

“Do our design system components use auto-layout and min-width constraints rather than fixed pixel widths?”

What to look for: Figma or CSS components with flexible container bounds and multi-line wrapping states.
For EngineeringQuestion #2

“Does the layout budget extra vertical line-height for scripts with stacked diacritics?”

What to look for: Adequate line-height (at least 1.4 to 1.6) for Thai, Arabic, and Devanagari scripts.
For ProductQuestion #3

“Have we audited core conversion funnels in German and Portuguese before launch?”

What to look for: Screenshots of checkout, registration, and onboarding flows with actual translated copy.
For QAQuestion #4

“Do automated visual regression tests inspect components in expanded pseudolocalization?”

What to look for: Automated Cypress or Playwright snapshots flagged for horizontal and vertical overflow.

Mechanism

Horizontal and vertical text expansion

Translated text changes length because languages encode grammar differently. German forms long compound nouns, Russian and Finnish add case inflections, and Romance languages insert articles and prepositions. Short UI labels expand by the largest percentage because grammatical particles make up a large share of a short string. The W3C and IBM expansion guidelines specify +100% to +200% additional width for source strings up to 10 characters, tapering to +30% for strings over 70 characters.

Expansion also operates in reverse and along the vertical axis. Chinese and Japanese strings frequently use 30% to 50% fewer characters than English, so components must look balanced when text contracts. Scripts such as Thai, Devanagari, and Arabic stack diacritics, vowel marks, and tone marks above and below the baseline. These scripts require 20% to 40% more line-height than Latin text to prevent vertical clipping.

Interactive demo

Guided exercises

  1. 1
    Keep the “CTA button” scenario and drag the container width down until German (“In den Warenkorb”) breaks. English still fits at the width where German wraps or truncates. The percentage badges report each locale's length change relative to the English source.
  2. 2
    Find Chinese (加入购物车) and Japanese in the grid. Chinese and Japanese contract relative to English (−55% and −45% on this button), so fixed wide buttons leave excess whitespace.
  3. 3
    Switch the scenario to “Notification card”. Longer full sentences expand by a smaller percentage than short labels. The maximum expansion drops from +91% on the button to +26% on the card.
  4. 4
    Pick the narrowest width where every locale still renders acceptably. That pixel measurement defines the minimum safe container width for the component across all target locales.
en-US+0%

Add to cart

de-DE+45%

In den Warenkorb

fr-FR+55%

Ajouter au panier

es-ES+55%

Añadir al carrito

pt-BR+91%

Adicionar ao carrinho

it-IT+82%

Aggiungi al carrello

ru-RU+64%

Добавить в корзину

pl-PL+45%

Dodaj do koszyka

fi-FI+55%

Lisää ostoskoriin

zh-CN-55%

加入购物车

ja-JP-45%

カートに追加

ar-SA+18%

أضف إلى السلة

One string, three different sizes

UTF-8 takes 1 byte for ASCII, 2 for Cyrillic and Arabic letters, and 3 for Chinese and Japanese characters. Pixel width is set by the font and matches neither count.

LocaleTitleCode pointsUTF-8 bytespxvs. en-US
en-USAdd to cart1111—0%
de-DEIn den Warenkorb1616—+45%
fr-FRAjouter au panier1717—+55%
es-ESAñadir al carrito1718—+55%
pt-BRAdicionar ao carrinho2121—+91%
it-ITAggiungi al carrello2020—+82%
ru-RUДобавить в корзину1834—+64%
pl-PLDodaj do koszyka1616—+45%
fi-FILisää ostoskoriin1719—+55%
zh-CN加入购物车515—-55%
ja-JPカートに追加618—-45%
ar-SAأضف إلى السلة1324—+18%

“vs. en-US” compares rendered pixel width, the measure that decides overflow.

Writing to a limit

The CAT tool's counter, the limit in the spec, and the width the UI enforces measure different things.

German: 16 characters: exactly a 16-character limit

Graphemes

16

user-perceived characters

Code points

16

[...str].length

UTF-16 units

16

str.length

Pixels

0

box is 120px

In the box

In den Warenkorb

Inside both limits. The Japanese preset has six characters; compare its pixel count.

The three counts diverge only on non-ASCII text. An emoji with a skin tone is one grapheme, two code points, and four UTF-16 units. A budget expressed in .length charges it four times.

The 30% figure is for long text

IBM's table applies a flat +30% only past 70 characters. In the CTA button scenario, the badges run from −55% (Chinese) to +91% (Portuguese).

  • Budget widths in measured pixels.
  • Let subtitles wrap to two lines.
  • Position CTAs with inset-inline-end: an element placed with right stays on the right in Arabic and Hebrew.

Implementation rules

  • Budget container width by source string length. The IBM and W3C expansion table requires +100% to +200% extra width for strings up to 10 characters, tapering to +30% for strings over 70 characters. Verify layouts early with pseudolocalization.
  • Avoid fixed width and height constraints. Use min-width with flexible max-width. Provide sufficient line-height for scripts such as Thai, Arabic, and Devanagari, where stacked vowel marks and diacritics clip inside tight vertical boxes.
  • Provide accessible disclosure when truncation is required. In compact badges or table headers, expose the full string via a tooltip or expandable view. Do not replace text labels with unvalidated icons, because visual metaphors vary by region.
  • Measure rendered pixel width in CI. Character counts do not predict pixel width across proportional fonts and CJK ideographs. Test components against the longest translated strings before release.

Operational context

Roles

DesignEngineeringProduct

Workflow stages

  • ·Design review for UI components
  • ·Component library layout audits
  • ·Pre-release QA on translated builds

Production incident

The IBM localization expansion table, republished by the W3C, assigns the largest percentage growth to the shortest English strings. Navigation tabs, buttons, and status badges are the components most likely to use fixed widths and the components that expand the most in translation.

W3C: Text size in translation ↗

Terms in this chapter

Further reading

Related chapters