Notes

Translate it until it breaks

2 November 2026 2 min read

The same small panel, built twice. Switch to German, Arabic or 200 % text and count what breaks.

  • Localization
  • Layout
  • Accessibility

A design is usually drawn once, in the language of the people drawing it. Then it ships to people who read other words, in other directions, at other sizes. The panel below is a small delivery form. Both sides look the same in English.

Language

Built for the English mockup

Fragile

Delivery details

Free
AddressTimeNotes

We deliver within two working days.

Full name
Cancel Save changes

0 problems

Built to be translated

Resilient

Delivery details

Free
AddressTimeNotes

We deliver within two working days.

Full name
Cancel Save changes

0 problems

Live demo. Everything runs in your browser. Now try to break it.
TranslateBreak.svelte, 230 lines

Switch the language. Then push the text size to 200 % and narrow the width. Every element that is cut off, overlaps another one or leaves the box gets an orange outline and is counted.

Four ways to torture a layout

  • Pseudo-localization. Every string gets accents and about 40 % extra length, in brackets. You can read it, and anything that does not fit shows up before a translator is involved. Brackets that disappear tell you text is being cut.
  • German. Not just longer, but built from long words. A title that was one short word is now Lieferadressenverwaltung and no amount of "40 % more" prepares you for a single word wider than the box.
  • Right to left. In Arabic the whole interface mirrors. Anything built with left, margin-left or text-align: left stays on the wrong side.
  • Big text. People raise the text size in their system. Fixed heights and fixed widths do not follow.

What the left side does wrong

It was made to match a mockup. Fixed widths and heights, white-space: nowrap, overflow: hidden, positions from the left and right edge.

.title { width: 10em; white-space: nowrap; overflow: hidden; text-align: left; }
.badge { position: absolute; right: 0; width: 4.5em; }
.desc  { height: 2.6em; overflow: hidden; }

What the right side does instead

Boxes grow with their content. Rows wrap. Directions are logical, so they follow the language. Long words are allowed to break.

.head  { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4em 0.8em; }
.title { min-width: 0; overflow-wrap: anywhere; hyphens: auto; text-align: start; }
.tab   { border-block-end: 2px solid; }
.btn   { flex: 1 1 7em; min-height: 2.4em; }

min-height rather than height, start rather than left, border-block-end rather than border-bottom, gap rather than margins on one side. The rest is letting a row wrap.

A habit worth having

Put pseudo-localization and a right-to-left switch into your development build. It costs an afternoon, and after that you find the broken layout when you write it, not when the Arabic version ships.

About the counter

The counter measures what a browser can see: clipped text, overlapping boxes and boxes outside their parent. It does not see an awkward line break or a translation that reads wrong. A clean count means the layout holds, not that it is good.

Related

How bright was it?

Five lamps and an optional line. Feedback, a bug, an idea, anything. I read every one and sum them up once a month.

Pick a lamp

Stored without name, address or cookie, and deleted after a year. Details in the privacy notice.