A programming technique that embeds variables, expressions, or placeholders directly within string literals, evaluating them at runtime to produce a final string.
String interpolation is the process of embedding variables or expressions within a text string so that the final output displays the actual values. Instead of concatenating text manually, developers use placeholders that the system replaces at runtime (for example: "Welcome, {username}!").
In localization, string interpolation is critical because translators must understand how placeholders work and where they appear in context. Misplacing or altering them can break functionality or display errors in localized versions. When developers write interpolated strings like $"You have {count} items" directly in their code, the format string is fixed and cannot be translated.
Translators need access to the complete string with placeholders they can rearrange according to their language’s grammar rules, but interpolated strings are often compiled into code before translation happens. The core issue is that formatting happens before translated strings are loaded. The string format is baked into the code at compile time, but localization requires loading translated format strings at runtime. Different languages need different word orders, so a translator might need to rearrange "{name} has {count} items" into "{count} items belongs to {name}" or another structure entirely. With hardcoded format strings, this reordering requires source code changes.
{0}, {name}, or %@) that translators can reorderString interpolation plays a vital role in making dynamic content localizable without breaking structure or readability. When handled properly, it keeps translations accurate, prevents runtime issues, and ensures users across all languages see messages that work as intended.
Different languages require different word orders. Translators must receive the full format string so they can restructure sentences without touching code. When format strings are hardcoded, translators lose control over sentence structure and must rely on engineering changes. Localazy automatically protects and highlights placeholders and variables so translators can safely work with interpolated strings.