Localizable Strings

Last updated: May 12, 2021Author: Jakub Pomykała

Localization on macOS and iOS looks very similar. Both platforms share the same concepts, programming language and localization approach. In Swift world, the most commonly used localization format for messages are *.strings files. Each *.strings file contains translated messages and sits in a separate directory, see an example below.

macos and ios localizable strings

Translations format is straightforward. The first value is a translation key used by a programmer during software development, and the second is a translated message which will be visible for the end user.

File format example

"Access denied!" = "¡Acceso denegado!";
"Accurate to approx. 15 decimal places" = "Accurate to approx. 15 decimal places";
"Accurate to approx. 7 decimal places" = "Accurate to approx. 7 decimal places";

Upload with CLI

simplelocalize upload --apiKey <PROJECT_KEY> \
  --uploadFormat localizable-strings \
  --uploadPath ./{lang}/Localizable.strings

Learn more about SimpleLocalize CLI and translations upload feature.

Download with CLI

simplelocalize download --apiKey <PROJECT_KEY> \
  --downloadFormat localizable-strings \
  --downloadPath ./{lang}/Localizable.strings

Learn more about SimpleLocalize CLI and translations download feature.

Import with API

curl
    --request POST \
    --url 'https://api.simplelocalize.io/api/v2/import?uploadFormat=localizable-strings' \
    --header 'x-simplelocalize-token: <API_KEY>' \
    --form file=@/path/to/your/Localizable.strings

Learn more about importing translations with API

Export with API

curl
    --request GET \
    --url https://api.simplelocalize.io/api/v3/export?downloadFormat=localizable-strings \
    --header 'x-simplelocalize-token: <API_KEY>'

Learn more about exporting translations with API