iOS Strings
iOS .strings files, from pairs to comments
Apple’s .strings format has carried iOS and
macOS translations for decades: quoted key value pairs, terminating semicolons, and
comment blocks that double as translator context. It looks trivial and hides real
traps, starting with the fact that Xcode still writes these files as UTF-16, which
tools reading UTF-8 see as garbage.
This page covers the syntax, the encodings, where plurals actually live on Apple platforms, and the folder conventions Xcode expects.
/* Title of the checkout screen */
"checkout.title" = "Récapitulatif de commande";
/* Main navigation */
"menu.home" = "Accueil";
"menu.projects" = "Projets"; Cheatsheet
.strings syntax in five rows
"key" = "value"; One pair per line, and the semicolon is not optional. Keys are arbitrary strings; dotted names keep them organized. /* comment */ The block above a pair imports as that key’s note, so the context written for translators arrives with the string. %@, %d, %1$@ Foundation format specifiers; %@ is the string one. Positions matter once there is more than one argument. \" \n \\ The escapes that survive a round trip through Apple’s tooling. Conventions
Where .strings lives
fr.lproj/Localizable.strings fr.lproj/InfoPlist.strings .xcloc bundles carrying XLIFF
Typical flow: import the existing Localizable.strings per locale to
seed the project, translate alongside your
Android and web strings, and hand
results back to Xcode through XLIFF.
Where Apple keeps plurals: .stringsdict
Plurals live in a separate property list file beside the .strings file, keyed by CLDR categories.
<key>cart.items</key>
<dict>
<key>NSStringLocalizedFormatKey</key>
<string>%#@items@</string>
<key>items</key>
<dict>
<key>NSStringFormatSpecTypeKey</key>
<string>NSStringPluralRuleType</string>
<key>one</key>
<string>%d article</string>
<key>other</key>
<string>%d articles</string>
</dict>
</dict> A different file and a different format from .strings. locamorph does not read it today; for iOS plurals, the XLIFF route through Xcode is the one that works.
Plurals
Plurals and .strings
There is no plural syntax in this format; Apple put plurals in
.stringsdict, a separate XML file locamorph does not read today. For
iOS plurals, the working route is XLIFF: Xcode exports
and imports it natively, and locamorph writes plural groups XLIFF tools understand.
See the same plural in every format locamorph exports.
In locamorph
How locamorph handles .strings
UTF-16 is not garbage here
Files are decoded as UTF-8 or UTF-16 in either byte order, so the file Xcode actually wrote imports cleanly instead of misdetecting as another format.
Comments become notes
The /* comment */ above each pair imports as that key’s
note, so translators see the context the developer wrote.
Locale from the path
fr.lproj/Localizable.strings is recognized as French without
anyone filling in a dropdown.
Plurals live outside this format in .stringsdict, which locamorph
does not read today; plural strings for iOS are best managed through
XLIFF, which Xcode exports and imports natively.
Convert
Convert .strings to other formats
One direction only for now: locamorph imports .strings but does not
export it, so conversions start from the Apple side.
.strings to JSON
iOS copy reused in a web or React Native build.
- Import
Localizable.strings; the lproj folder names the locale. - Comments arrive as notes.
- Export as JSON for your JS i18n library.
.strings to XLIFF
Handing an iOS app to a translation agency.
- Import the
.stringsfiles per locale. - Notes ride along as XLIFF notes.
- Export XLIFF 1.2 for any CAT tool, or for Xcode itself.
.strings to strings.xml
Porting iOS copy to the Android build.
- Import the iOS files.
- Dotted keys become resource names.
- Export Android XML with escaping applied.
Related
Keep going
XLIFF
Xcode’s own interchange format, read and written by locamorph.
Android XML
The other app store, with plurals and comments fully round tripped.
CLI
Script imports from your Xcode project in a couple of lines.
Further reading
- Apple’s localization documentation
- Exporting localizations from Xcode, the XLIFF route
- String Catalogs, the .xcstrings successor
Seed a project from your lproj folders
Import your existing iOS strings on the free plan, keep the comments, and translate every platform’s files in one place.