The oldest form, from NeXTSTEP and OpenStep. Apple’s frameworks read it but no longer
write it. People still meet it as .strings localisation files, and as Xcode’s
project.pbxproj, which is
written in this form.
The values
| Value | Written as |
|---|---|
| Dictionary | { key = value; key2 = value2; }. Each entry ends with a semicolon. |
| Array | ( one, two, three ). A trailing comma is allowed. |
| String, bare | Letters, digits and _ $ / : . -, with no quotes. |
| String, quoted | Between " or ' marks. |
| Data | Hexadecimal digits between < and >, with spaces allowed: <48 65 6C 6C 6F>. |
There are no numbers, booleans or dates. Everything that is not a dictionary, array or data is a string, and what it means is up to the program reading it.
Quoted strings
Inside quotes, a backslash starts an escape:
| Escape | Means |
|---|---|
\a \b \f \n \r \t \v | The control characters of the same letters. |
\" \' \\ | The character itself. |
\ooo | Up to three octal digits: a character by number. |
\Uhhhh | Up to four hexadecimal digits: a character by code point. |
Comments
// to the end of the line and /* between these marks */.
Comments and white space may go between any two values.
Strings files
A .strings file has no braces around it. It holds the contents of a
dictionary, one key = value; pair after another. A key alone,
key;, means the value is the same as the key. These files are often
UTF-16 with a byte order mark, and Apple’s tools also accept UTF-8.
/* Shown on the first screen */
"Hello" = "Bonjour";
"Bye" = "Au revoir";