Troubleshooting
Why HMI Text Shifts When You Switch Languages
Short answer
A language switch replaces only the string inside each shared text object; the object keeps one position and one alignment setting, so a longer translation lands on the opposite side of its box. Set the alignment that pins the edge your layout needs, size every box for the longest translation in the set, and strip trailing spaces from the language export. No supported setting stores separate coordinates per language; only duplicate artwork selected at runtime does that.

On this page
- Why does text move when I switch languages?
- Which alignment should each text object use?
- How wide should the text box be?
- Why does one language show an extra gap or blank line?
- Do I need a different font for each language?
- Can each language keep its own text position?
- How do I verify the layout before the panel ships?
- Questions asked
Switching languages on an HMI does not move the objects; it swaps the string each text object displays. The object keeps one position and one alignment setting, so when the new string is longer or shorter than the one you laid out, the text lands on the other side of the same box or wraps and looks displaced. That is why labels laid out beside their controls in one language drift the moment the panel switches to the other. The fix is three settings, all in the editor: alignment that pins the edge your layout needs, box widths sized for the longest translation in the set, and an export file cleaned of trailing spaces and stray line breaks. There is no supported way to store independent coordinates per language — a translated string supplies text, not geometry. Here is how to tell which of the three is moving your text, and how to prove both languages before the panel ships.
Why does text move when I switch languages? #
The text moves because the object is shared: a language switch loads a different string into the same text object at the same coordinates, and the object's alignment setting decides which edge that string grows from when its length changes.
Compare one affected label in both languages against a nearby fixed control such as a button or an indicator, and look at the box edges as well as the letters. The box and its neighbors are your reference: if they hold still while the letters move, you have a string-length and alignment problem, not a layout problem. Match what you see against one of these patterns before changing anything:
- The box and neighboring controls stay put while the text starts at a different point — the two strings differ in length and the object's alignment anchors the text to one edge of its box.
- The label overruns its box, clips, or wraps to a line it did not have before — the longest translation needs more width than the box gives it at the configured font.
- One language shows a gap before the first letter or an extra blank line — the stored string carries trailing spaces or a line break.
- The box itself sits somewhere else — you are looking at a different screen, a different object or an edited project, so confirm the display and the runtime build first.
Do not start by nudging every label in the displaced language. Establish which pattern you have first, because each pattern has a different fix.
Which alignment should each text object use? #
Set right alignment on every label whose right edge must stay fixed, such as text sitting immediately to the left of a button or indicator; use left alignment when the left edge must stay fixed, and center alignment only when the longest translation fits the space.
Alignment belongs to the text object, not to the language. In FactoryTalk View Studio the setting lives in the Text Properties dialog of the text object; other HMI editors put the same horizontal justification field on the object's properties dialog. Decide which edge of the label must stay visually fixed, set that alignment on one label, switch languages at the runtime, and confirm the intended edge holds. Then apply the same rule to every label with the same layout:
- A label sitting immediately to the left of a fixed control gets right alignment, so its right edge stays against that control in both languages.
- A label sitting to the right of a fixed control gets left alignment, so it grows away from the control instead of over it.
- A label centered over its control stays centered, and its width check is the longest translation, covered in the next section.
One label first, then the group: changing every label at once hides which change fixed the symptom.
How wide should the text box be? #
Size every box for the longest translation in the language set, not for the language you drew the screens in: count the longest string, scale the English box width by the length ratio, and confirm the result at runtime.
Character counts give you the first estimate. Take a typical start button: English "Start Cycle" is 11 characters and Spanish "Inicio del Ciclo" is 16, so the ratio is 16 ÷ 11 ≈ 1.45. If the English box is 110 px wide at the configured font, the Spanish string needs roughly 110 px × 1.45 ≈ 160 px, so set that box to 160 px or slightly more and keep it clear of the neighboring control. Character-count scaling assumes similar average glyph widths in both strings, which proportional fonts only approximate, so treat 160 px as the starting width and let the runtime test settle it.
The decisive check is switching languages at runtime and confirming that neither version clips, wraps or overlaps:
- List each label's full strings in every language, including any spaces.
- Size each box to the longest string in its set, keeping neighboring controls clear.
- Rebuild, download and switch languages; fix any label that still wraps or touches a neighbor.
Never make a short string look longer, or a long one look shorter, with filler spaces — the next section shows what those do.
Why does one language show an extra gap or blank line? #
An unexpected gap or an extra line almost always means trailing spaces or a stray line break inside one language's stored string, and you find them in the language export file rather than on the screen.
The export is the honest record of what each string really contains. Export with the same workflow that added the second language: Studio 5000 View Designer documents its export under the Tools menu as Export Languages, and FactoryTalk Machine Edition tooling exports the application's strings to an editable text file or spreadsheet for translation. In the export, the base string and the translation sit in separate labeled fields — one format keeps the English text in a Phrase attribute and the translated text in a Translation attribute.
Trailing spaces are not harmless. The same invisible characters that corrupt a WinCC tag write when they ride along on a tag name will pad a label here, because the runtime treats every space in the string as real content. A stray line break misbehaves the same way, as the breakdown of line breaks and spaces in URScript popups shows for another runtime: the renderer obeys the character, and your vertical spacing and apparent alignment follow it. Work the padding out of the data:
- Export the language data using the workflow that added the second language.
- Search the records for two or more spaces immediately before the closing quote — in a text export that pattern finds padded strings in one pass.
- Delete the accidental spaces and any stray line break, and keep the single spaces that separate words.
- Import, rebuild the runtime and switch languages on the panel to confirm the gap and the extra line are gone.
Do this before repositioning anything: a padded string explains a displaced label even when the alignment and box width are already correct.
Do I need a different font for each language? #
Keep one font and size for both languages: the object stores a single font setting, so a switch of language changes the glyphs, not the font, and character counts stop predicting width once those glyph widths differ.
Judge fit by rendered width, not character count: two strings with similar counts can occupy different widths, and the runtime draws whatever the one font produces. If only one language wraps, widen that box or use an approved shorter wording; do not shrink the font until the label is hard to read. Make one change at a time — change font and alignment together across many labels and you cannot tell which change moved the text. Characters that fail to render at all, hollow boxes or garbage glyphs, are a separate fault: the write-up on why Korean text fails to display on a Comfort Panel covers that font-coverage problem, and it needs fixing before any alignment judgment means anything.
Can each language keep its own text position? #
No — a translated entry supplies a different string for the same shared object and nothing else, so there is no supported setting that stores one set of coordinates per language.
The only route to genuinely different layouts is duplicate artwork: copy the display or the affected graphic elements, lay each copy out for its language, and have the runtime select the matching set when the language changes, where the platform provides a documented way to make that selection. That choice doubles maintenance — every future screen edit happens twice and the two copies drift apart. For ordinary labels, the shared object with the correct anchor and a box sized for the longest string is the design that stays correct. Reserve duplicate artwork for the rare label that must sit in truly different places in each language.
How do I verify the layout before the panel ships? #
Verify on the target panel, not in the editor: build the runtime, download it, and cycle through every language on every screen, checking alignment, wrapping and overlaps against a fixed reference object.
Run the sequence on the bench with the machine stopped, because the labels you are checking are the operator's instructions. Then:
- Add both languages to the application's language list before laying out, so every string has a translation slot from the start.
- Set the alignment rule per label group: right for labels left of controls, left for labels right of controls, center only where the longest translation fits.
- Size each box to the longest translation in its set, clear of neighboring controls.
- Build the runtime, download it to the panel, and switch languages with the language-selection objects on every screen.
- Record every label that clips, wraps, overlaps or shows a gap, fix that object in the editor, rebuild and repeat until one full pass in every language is clean.
A clean pass means the shared-object design holds in every language of the set. If one label still cannot be made to fit, that label — not the whole screen set — is the candidate for duplicate artwork.
Questions asked
Does runtime language switching need a localized version of the development software?
No. The runtime language switch swaps the stored string set; the language of the engineering software is a separate choice. Localized versions of the development tool are licensed and installed separately, and an English development station can build an application that runs in Spanish and English on the panel.
How does the export file store the two languages?
The export keeps the base-language string and each translation as separate labeled fields of the same record. One platform stores the English text in a Phrase attribute and the translation in a Translation attribute; other tools use a spreadsheet or a plain text file with one row per string. Edit only the translation field and import with the same tool that exported.
Can I pad a short string with spaces to make both languages line up?
Never. Spaces typed into one language to nudge the text are string content: they move the visible text, they survive export and import, and they break again when the font or the wording changes. They are also the first thing to remove when a label shows a mystery gap. Fix width and alignment instead.
What if characters fail to display at all after the language switch?
That is a different fault from shifted text. Blank boxes, question marks or garbled glyphs mean the display font lacks those characters or the language was not present when the strings were imported. Solve the font and language setup first, because alignment fixes cannot help a character the panel cannot draw.
Should I lay the screens out in the customer's language?
That is a practical compromise when one language must look right and the other serves only internal testing. Lay out in the language that ships, use the second language at the bench, and still size every box and set every alignment for the longest string in the set, because both languages remain in the project.

