Apple strings
Translate Apple string-table values while retaining lookup keys and escaping the reconstructed text.
An Apple string table maps fixed lookup keys to displayed text. The xcode-strings file handler translates the right-hand values, keeps those keys, and writes escaped string literals back into a per-locale .strings file.
Keys and values #
For example:
/* Checkout heading */
"checkout.title" = "Complete your order";
"delivery.estimate" = "Delivery within %d days";The two right-hand values are text units. checkout.title and delivery.estimate remain lookup keys. Comments are retained with entries, but this handler does not convert their wording into translator hints. Use the translation workflow's supported context mechanisms when a short label is ambiguous.
Quoted keys and values, assignment signs, and semicolons are part of the supported string-table syntax. The parser decodes supported escapes; output escapes quotes, backslashes, newlines, tabs, and carriage returns. Value replacements retain surrounding comments and entry spacing.
Merge and resource placement #
The previous source determines changed values by key, while an existing target provides retained translations. The current source defines the entry set and comments. Use ordinary source updates for changed messages, or a deliberate whole-file refresh after changing translation guidance; see CLI scopes.
Place locale resources where the application loads them, for example en.lproj/Localizable.strings and de.lproj/Localizable.strings. A source in Base.lproj has different path-derivation meaning from a locale-named directory. Inspect the destination through the selected tool; translating the table does not configure the application's development language or resource membership.
Configure and load the string table #
The CLI infers xcode-strings from .strings. Use CLI configuration for selection and path rules, or GitHub for managed repository output.
Load the target table in the app and exercise format specifiers with actual values. Use stringsdict for plural-selection resources. If the project uses String Catalogs, follow their shared-file merge rules instead: renaming one catalog per locale would create a different resource layout.