To translate a legacy Apple strings file offline, work in a copy for the target language and change only the values readers see. Keep the resource table name, lookup keys and format argument types intact. Use plutil to check the file’s syntax, then substitute recognizable values into a sample message and inspect the result in the app that will display it.
Identify the resource table you have been asked to translate
Ask for the source language, the destination locale, the resource filename and the screen on which at least one affected message appears. In a conventional localized bundle, the English and Spanish files can both be named Localizable.strings, with the language identified by their enclosing en.lproj and es.lproj directories. A project can use a different table name. Copy the structure the developer supplied. Renaming a default table to Localizable.es.strings in the same folder changes its name and can make an otherwise correct resource invisible to the application.
This guide covers the text-based strings resource with individual quoted keys and values. Current Xcode projects can also use a string catalog. A file ending in xcstrings has its own format and editing workflow. Check which source the project maintains before doing a long translation in a file that a later build will regenerate. If the maintainer gave you an exported translation package, ask which file they expect back and where to place it in that package.
Make a working copy of the target language directory. Preserve any existing translations that the current task does not change. When the target file is new, copy the source file under the same table name into a new language directory. Use a plain-text editor that understands the file’s existing encoding. Turn off substitutions that change straight quotes as you type. Keep the source and target open side by side with the folder names visible; two windows named Localizable.strings otherwise look remarkably similar.
Prepare the local translation step
On the Mac, open General in System Settings and choose Language & Region, then Translation Languages. Download the source and destination languages while connected. Enable On-Device Mode if you also want translations to use those downloads when connected. Disconnect Wi-Fi and other active network connections when convenient and test a new sentence selected in a local TextEdit window. Control-click the selection, choose Translate and check that the requested languages are selected.
For a resource containing formatting instructions, start by describing the sentence to yourself with real nouns. Imagine the English message reads “Send the package to North.” The application supplies the package name and the destination name separately. Translate that sentence in a scratch document and decide which word denotes each supplied value. Return to the resource and put its original format arguments in the corresponding positions. This protects the percent sign, argument index and type letter from any substitutions introduced by the translation service.
Use the nearest developer comment as context. A value that says “Open” could be a command on a folder, the state of a door, or part of an error explanation. In Spanish the three uses may call for different wording. Keep distinct resource keys even if their current English values happen to match. If the comment still leaves the meaning uncertain, record the question against the exact key and ask for a screenshot or the name of the control where it appears.
Edit a small working example
The following is an illustrative source table for a package handoff screen. The developer has described the first argument as the package label and the second as the destination. Both are objects represented in these format strings by the at sign. The status message takes one integer. The hint contains escaped quotation marks and a line break. The final label is plain text and is never passed to a formatter in this example.
/* 1: package label. 2: destination. Used as a format string. */
"dispatch.message" = "Send %1$@ to %2$@.";
/* Integer percentage, formatted at runtime. */
"dispatch.progress" = "Progress: %d%%";
/* Static help, with a line break. */
"dispatch.hint" = "Choose \"Review\".\nCheck the destination.";
"dispatch.plainLabel" = "50% sample";
Translate only the value to the right of each equals sign. Keep the quotes that delimit the key and value and the semicolon that terminates the entry. The Spanish sample below puts the destination first to demonstrate positional arguments. Read the complete sentence with concrete values before deciding whether the reordered message communicates the same action. Follow the project’s preferred style for instructions and punctuation.
/* 1: package label. 2: destination. Used as a format string. */
"dispatch.message" = "Destino: %2$@. Enviar %1$@.";
/* Integer percentage, formatted at runtime. */
"dispatch.progress" = "Progreso: %d%%";
/* Static help, with a line break. */
"dispatch.hint" = "Selecciona \"Revisar\".\nComprueba el destino.";
"dispatch.plainLabel" = "Muestra del 50%";
In the formatted progress message, two percent signs produce one literal percent sign when the value goes through the formatter. The plain label follows a different path. In a string shown directly as a label, a literal percent character is already the desired text. Doubling every percent sign in the file would give this static label an extra character. If you cannot tell whether the app formats an entry, consult the developer comment or the call site instead of applying a global replacement.
Keep the argument types attached to their intended values. An object conversion and an integer conversion request different kinds of data from the caller. Reordering two indexed arguments for grammar can be appropriate. Changing an integer specifier to a floating-point conversion to imitate a decimal separator changes the interface between the resource and the code. The translation editor does not get to change the type the application passes in.
Check syntax and values independently
Save the Spanish example in a test folder and run the following command in Terminal with your actual path. A successful lint result means the resource can be parsed on that Mac. It cannot tell you whether you changed a lookup key, assigned the wrong argument to a destination, or produced a translation that fits the button. A parse failure referring to one line may originate on the preceding line when a closing quote or semicolon was lost.
plutil -lint "es.lproj/Localizable.strings"
For a small file, compare the strings to the left of the equals signs with the original, working down the list. For a larger delivery ask the maintainer to compare key sets with the project’s existing tooling. Counting the number of lines in two resources is an unreliable shortcut. Comments may occupy different numbers of lines, and replacing one key with a wrong key leaves the count unchanged. Include accidental extra entries in the comparison too. A typo can leave an old English entry active alongside a new Spanish one that nothing uses.
Simulate visible values before reviewing the full screen. Give the package label the value Box-A and the destination the value Dock-B. The Spanish dispatch message in the example should show Dock-B after “Destino” and Box-A after “Enviar.” If both values are ordinary place names, a reversal can read naturally and pass unnoticed. Use a quantity that makes a malformed percent output obvious, such as 37, and read the progress label as a user would see it. The help text should display a quoted word and then a second line.
Try a controlled negative test on a copy of the example. Swap the two position numbers in the translated dispatch message and run the syntax check again. The file may still parse because both placeholders are valid text inside a quoted value. Substituting Box-A and Dock-B exposes the defect immediately. Restore the correctly reviewed value in the working file. Keeping this pair of sample values in the delivery note gives a developer an inexpensive regression test.
Find an encoding or escape problem before changing the translation
If an entry looks correct in the editor but displays two literal characters where a line break belongs, check how the value was entered. A resource containing one backslash followed by n encodes a line break. A resource escaping the backslash itself can leave a visible backslash followed by an n. Compare the source file, the decoded value and the final screen. These are three views of the same string at different stages. A representation intended for a programming-language literal or a JSON file may need different escaping from the strings resource you actually maintain.
On macOS you can inspect a decoded copy without changing the working file. Run the following command from the directory containing the test language folder. Writing to standard output leaves the original resource in its existing format. The JSON representation also has its own escaping conventions. Seeing a backslash-n in the serialized JSON can be the expected representation of a decoded line break, so use a parser if you need to count the actual characters.
plutil -convert json -o - "es.lproj/Localizable.strings"
For example, a developer reviewing a help label could ask whether “Revisar” appears in straight quotes and whether the next sentence begins on a new line. Have them inspect that exact resolved string, then open the control. A control configured to show only a single line might still clip the second sentence even when the resource contains a correct line break. Handing over both observations directs the next change to the right place.
An accented letter that appears wrong in every translated value suggests an encoding or export issue worth checking at the file level. A single incorrect accent in one word is a different kind of error. Compare it with the text in the reviewed scratch document and correct that value if appropriate. Avoid globally replacing accented characters with plain ones to make an editor display look tidier. The recipient needs the reviewed language, and changing its spelling can introduce new errors unrelated to the original display problem.
Check the string in the screen that uses it
Ask the application maintainer to build the target language version or use the project’s normal local preview if you have access to it. Navigate to the exact screen that consumes the key. If only one label remains in English, check the spelling of that key and the localized value. If the whole screen remains in English, verify the selected language, bundle, target membership and resource table name before changing the Spanish wording again.
Test an unusually long but plausible package label and destination in the window size the app supports. Look for truncation that hides the destination, wraps a button onto two lines, or pushes a consequential action out of view. A shorter translation may help. Reordering or deleting an argument solely to make the string fit can change the decision the reader is being asked to make. Record the affected control and the sample values so the developer can decide whether the layout needs more space.
For delivery, keep the edited table in its correct locale directory. Include the source version, the tested sample arguments, any keys awaiting clarification, and whether the running app was available for a visual check. When the software developer later changes a key or adds a new argument, those details make it possible to review just the affected message instead of retranslating all the neighboring controls.