Skip to main content
Apple Strings (.strings)
Nick Ustinov avatar
Written by Nick Ustinov
Updated over 5 months ago

Apple strings files (.strings) are used for managing localization strings in iOS and macOS applications. These files consist of key-value pairs that facilitate multi-language support by allowing the app to display text in different languages.

Technical information

Overview

Format name:
Apple Strings

File extensions:
.strings

Common use cases:
Managing localized text strings in iOS and macOS applications.

Technical details:

  • Structure: Apple strings files consist of one or more key-value pairs along with optional comments. Each key and value in a pair are strings of text enclosed in double quotation marks, separated by an equals sign, and ending with a semicolon.

  • Encoding: UTF-8

Example:
Here's an example of a typical Apple strings file:
โ€‹

/* Our app name */
"AppName" = "Lokalise";

/* User login dialog */
"EnterUsername" = "Enter your username";

In this example, the comments provide context for the key-value pairs, where AppName and EnterUsername are the keys, and Lokalise and Enter your username are the corresponding values.

Using with Lokalise

Lokalise supports Apple strings files, making it easy to manage your translations directly within the Lokalise platform.

Supported project types

Please note that Apple strings files can be uploaded only to Web and mobile projects.

Comments and key descriptions

When importing .strings files into Lokalise, all comments are saved as key descriptions. To include these comments in the downloaded files, ensure you tick the Include description option on the Download page:

Multiline support

Lokalise supports two ways of handling multiline strings:

1. Escaping new lines using \n:

"AppName" = "Lokalise\nis here";
"EnterUsername" = "Enter\nyour\nusername";

2. Using backslash (\) at the end of each line:

"AppName" = "Lokalise\
is here";
"EnterUsername" = "Enter\
your\
username";
Did this answer your question?