Localizable.xcstrings files are used in macOS and iOS applications for localization purposes. It's a simple text file format that contains translations for all messages used in the application. It's a JSON-like format, it's a successor of the Localizable.strings and Localizable.stringsdict file formats. Unlike the Localizable.strings format, the Localizable.xcstrings format is more structured and easier to read and contains translations for all languages and variations in one file.
![macOS and iOS Localizable XC Strings](/docs/localizable-xcstrings.jpeg)
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
{
"sourceLanguage" : "en",
"strings" : {
"1b7-l0-nxx.title" : {
"comment" : "some comment",
"extractionState" : "manual",
"localizations" : {
"de" : {
"variations" : {
"device" : {
"mac" : {
"stringUnit" : {
"state" : "translated",
"value" : "Suche"
}
},
"other" : {
"stringUnit" : {
"state" : "translated",
"value" : "Finde"
}
}
}
}
},
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Find"
}
}
}
}
// more translations
}
}
Upload with CLI
simplelocalize upload --apiKey <PROJECT_KEY> \
--uploadFormat localizable-xcstrings \
--uploadPath ./Localizable.xcstrings
Learn more about SimpleLocalize CLI and translations upload feature.
Download with CLI
simplelocalize download --apiKey <PROJECT_KEY> \
--downloadFormat localizable-xcstrings \
--downloadPath ./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-xcstrings' \
--header 'x-simplelocalize-token: <API_KEY>' \
--form file=@/path/to/your/Localizable.xcstrings
Learn more about importing translations with API
Export with API
curl
--request GET \
--url https://api.simplelocalize.io/api/v3/export?downloadFormat=localizable-xcstrings \
--header 'x-simplelocalize-token: <API_KEY>'
Learn more about exporting translations with API