Skip to content
Games By Cube Localization Team 7 min read

String Length, Variables and Plurals: A Developer Checklist for Localization

game internationalization means preparing your code and assets so any language can be added without rework. Before you send strings to translators, exte…

String Length, Variables and Plurals: A Developer Checklist for Localization

Short answer: game internationalization means preparing your code and assets so any language can be added without rework. Before you send strings to translators, externalize every piece of text, leave room for longer translations, use named variables instead of concatenated sentences, support proper plural and gender rules, choose fonts that cover your target scripts, and give each string a unique ID and context note.

Most localization problems that reach players were not created by translators. They were created months earlier, when a programmer glued two strings together, hard-coded a date format or sized a button for exactly six English letters. Fixing those issues after translation is slow and expensive, because every fix touches code, builds and testing again. This checklist collects the internationalization (i18n) checks that save the most time, written for developers and producers who want their first localized build to work the first time.

Why internationalization comes before localization

Internationalization is engineering work: it makes the game able to run in other languages. Localization is the language and cultural work that fills it. If the first step is skipped, the second turns into a cycle of bug reports such as "text cut off", "variable shows as {0}" or "Arabic letters are disconnected". Each of those bugs is cheap to prevent in code and expensive to fix in LQA.

The good news is that most of the checklist is a set of habits. Once your team follows them, every new language costs less, and live updates move faster. If you are still estimating the overall budget, our guide to game localization cost shows how file preparation affects the final invoice.

Illustration of a game developer at a desk checking menu buttons of different widths before localization
Most localization bugs are prevented at the developer's desk, not in translation.

1. Externalize every string

Every piece of player-facing text should live outside the code, in string tables, resource files or a localization system, never inside a script or a texture. That includes the text people forget:

  • Error messages, server notices and connection warnings.
  • Text baked into images: logos with taglines, signs, maps, tutorial overlays.
  • Subtitles, credits, achievement and trophy names.
  • Store and platform metadata, push notifications and in-game mail.
  • Default player names, placeholder text and debug strings that might ship.

A quick test: switch the game to a pseudo-language (see section 8). Anything that still appears in plain English is hard-coded.

2. Plan for text expansion

Translations are often longer than English. German, French, Russian and Portuguese commonly run noticeably longer, and short UI labels can expand far more than long sentences because a one-word English label may need two or three words elsewhere. Arabic is usually similar in length to English or somewhat shorter, but it needs more vertical space for diacritics and taller letterforms. Chinese, Japanese and Korean are shorter in characters but need larger font sizes to stay readable.

Practical rules that work in many projects:

  • Design UI containers that grow or wrap instead of fixed-width boxes.
  • Leave extra horizontal space in short labels, and more again for one-word buttons.
  • Where a hard limit exists, store it as metadata next to the string (for example "max 18 characters") so translators can see it.
  • Decide what happens on overflow: auto-shrink within a minimum size, wrap, or scroll. Never silent clipping.
  • Avoid line breaks inside strings; let the layout handle wrapping.
Six internationalization checks before game localization: externalized strings, text expansion, variables, plurals, fonts, and context
Six checks that prevent most localization bugs before translation starts.

3. Use named variables, never concatenation

String concatenation is the single most common i18n bug. Code such as "You found " + count + " " + itemName assumes English word order. Other languages put the number, the noun and the verb in different places, and some change the noun's form depending on the number.

Instead:

  • Use one complete string with placeholders: "You found {count} {item}", so translators can move them.
  • Prefer named placeholders ({player_name}) over positional ones (%s, {0}). Names tell the translator what the value is.
  • Document each variable: what it can contain, its maximum length, and whether it is a number, a name or another string.
  • Avoid inserting translated nouns into translated sentences. In languages with grammatical gender and case, "the {item} is broken" may need a different article or ending for every item.
  • Do not build sentences from fragments across several string IDs.

4. Support plurals and gender properly

English has two plural forms: one and many. Many languages have more. Arabic distinguishes zero, one, two, a few, many and other; Russian and Polish have several forms; Japanese and Chinese often have none. A simple if (count == 1) check cannot handle this.

  • Use a plural-aware message format, such as ICU MessageFormat or your engine's or localization tool's plural support, which follows the Unicode CLDR plural rules.
  • Let each language provide as many plural variants as it needs.
  • Do the same for gender where the player or a character can be male or female, because verbs and adjectives change in Arabic, French, Spanish and many other languages.
  • Where gender is unknown, ask writers to prefer neutral phrasing in the source.

5. Fonts, scripts and text rendering

A font that looks great in English may have no Cyrillic, Arabic, Thai or CJK glyphs. Missing glyphs show as empty boxes, and that is a release-blocking bug.

  • List your target languages early and check that each font covers them, or define a fallback font per script.
  • For Chinese, Japanese and Korean, plan for large font files or dynamic font atlases.
  • Arabic and Persian need text shaping (letters join and change form) and right-to-left layout. Read our guide to Arabic fonts and RTL in Unity and Unreal before you commit to a UI framework.
  • Test line height, accents and diacritics so nothing collides with the line above.

6. Locale formats: dates, numbers, currency and input

  • Format dates, times, numbers and currencies with locale-aware functions, not hand-written strings.
  • Remember that decimal and thousand separators differ (1,000.5 vs 1.000,5).
  • Sort lists using locale-aware collation, not raw byte order.
  • Support Unicode in player names, chat and save files, including right-to-left input.
  • Do not use flags to represent languages; a language is spoken in many countries.

7. Give translators context

Context is the difference between a correct translation and a guess. Each string should have:

  • A stable, unique, readable ID (menu.settings.audio_title, not str_4471).
  • A note on where it appears and who says it.
  • Its character limit, if any.
  • A screenshot or a link to one, for UI strings.

Same English word, different meaning, different ID: "Play" as a menu button and "Play" as a theatre play are two strings. A shared glossary and style guide keeps character names and game terms consistent across the team.

Illustration of two developers reviewing a game build with a cartoon hero and an empty dialogue box
Pseudo-localization lets the team see layout problems before a single word is translated.

8. Test with pseudo-localization

Pseudo-localization replaces source text with a modified version that looks foreign but stays readable, for example accented letters, extra padding to simulate expansion and brackets marking the start and end of each string. Run it on every build that changes UI. It reveals:

  • Hard-coded text (it stays in plain English).
  • Truncation (the closing bracket disappears).
  • Concatenation (brackets appear in the middle of a sentence).
  • Font coverage problems (accented characters show as boxes).

A right-to-left pseudo-locale is also worth having if Arabic or Hebrew is on your roadmap. After real translation, schedule proper linguistic quality assurance in the build.

Quick reference table

AreaDoAvoid
StringsExternal string tables with unique IDsText in code or baked into textures
LengthFlexible containers, documented limitsFixed boxes sized for English
VariablesNamed placeholders in full sentencesConcatenation and fragments
PluralsCLDR-based plural rules per languagecount == 1 checks
FontsCoverage per script, fallbacks, shapingOne Latin-only font
FormatsLocale-aware dates, numbers, sortingHand-built date strings
ContextNotes, screenshots, character limitsA bare spreadsheet of strings

How Cube Localization can help

Games are one of our core fields, and our native linguists have worked on titles such as PUBG and Cyberpunk 2077. We can review your string files before translation starts and flag concatenation, missing context and risky limits. A typical issue we catch before translation starts: sentences built by joining pieces, such as "You found" + item + "!". In Arabic the word order and gender change, so the joined result is wrong. Flagging it early lets the developer switch to one full string with a variable, which saves a round of bug fixing later.

Send us a sample export and we will tell you what to fix first. Request a quote or learn more about our games and apps localization service.

Frequently asked questions

What is the difference between internationalization and localization?

Internationalization is the technical preparation that lets a game support any language: external strings, flexible layouts, Unicode, plural rules and fonts. Localization is the translation and cultural adaptation done for each specific language and market.

How much extra space should I leave for translated text?

There is no single number, but short labels need the most room because they can double in length, while longer sentences grow less. Build containers that resize or wrap, and record hard limits next to each string so translators can respect them.

When should we start internationalization?

As early as possible, ideally before the UI is built. Retrofitting i18n into a finished game is possible but usually means touching many screens and scripts, which costs more than doing it from the start.

Do we need pseudo-localization if we already test in English?

Yes. English testing cannot reveal hard-coded text, truncation in longer languages or missing glyphs. Pseudo-localization finds these problems in minutes, before any translation money is spent.

What file formats are best for game localization?

Any structured format that keeps IDs, source text, context notes and limits together works well, for example CSV or XLSX exports, JSON, XLIFF or PO files. The key is consistency and a clean round trip back into the engine.