New Tool Radar

AI Design Workflows

How to Check Translated Text for Overflow in an AI-Generated Layout

Fill an AI-generated layout with the translated text and check that no label, button or heading overflows its box.

Schematic with three steps: Place the translated text in the layout; Check every box for overflow; Widen the boxes or shorten the text.

Translated text is often longer than the English source, and a layout designed around short English labels can overflow when the translation is dropped in. WCAG requires that content can be presented without loss of information at a width of 320 CSS pixels, and that text can be resized up to 200 percent without loss of content or functionality. Check the layout with the real translated text in place, not with the English text, because the overflow only shows with the real words.

What you need

  • The AI-generated layout
  • The translated text for every label, button and heading
  • A way to place the translated text in the layout

Step 1: Place the translated text in the layout

Replace every English string in the layout with its translation, keeping the same font size and the same box sizes. Do not shorten the translation to fit.

Step 2: Check every box for overflow

Go through the layout and look for text that runs outside its box, overlaps another element, or is cut off with an ellipsis. Mark every box that overflows.

Step 3: Widen the boxes or shorten the text with the translator

Enlarge the boxes that overflow, reduce the font size where the design allows it, or ask the translator for a shorter version that keeps the meaning. Re-check the layout with the final text.

Worked example: synthetic overflow check of one layout

The table below is a synthetic example. It shows the expected result of checking one layout with German text; no layout was published.

Element English German Verdict
Button Save Speichern Pass
Heading Welcome Willkommen Pass
Label Settings Einstellungen Fail – overflows
Menu item Help Hilfe Pass

Expected result (UNTESTED). 3 of 4 elements fit in German, and the Settings label overflows its box, so the box must be widened or the text shortened before the layout is used. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • A translation can be longer in one language and shorter in another, so check every language the layout will ship in.
  • Shortening a translation to fit can change its meaning, so agree any shortening with the translator.
  • A layout that fits at one screen size can overflow at another, so check the smallest screen size too.
  • Text baked into an image cannot reflow, so a layout with image text needs a new image for each language.

Sources

See all