Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Apple Strings Catalog support added (blog + docs) #841

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions Localizable 2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"sourceLanguage": "en",
"version": "1.0",
"strings": {
"dog_count": {
"localizations": {
"en": {
"variations": {
"plural": {
"other": {
"stringUnit": {
"state": "translated",
"value": "I have %%lli dogs."
}
}
}
}
},
"cs": {
"variations": {
"plural": {
"one": {
"stringUnit": {
"state": "translated",
"value": "Já mám jednoho psa."
}
},
"few": {
"stringUnit": {
"state": "translated",
"value": "Já mám %%lli psi."
}
},
"other": {
"stringUnit": {
"state": "translated",
"value": "Já mám %%lli psů."
}
}
}
}
}
}
},
"hello": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Hello!"
}
},
"localizations": {
"cs": {
"stringUnit": {
"state": "translated",
"value": "Ahoj!"
}
}
}
}
}
}
35 changes: 35 additions & 0 deletions blog/2025-02-05-apple-stringsdict-support.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
slug: 2025-02-05-apple-xcstrings-import-export
title: 'Tolgee now Supports Apple String Catalog (.xcstrings)'
description: 'Tolgee now supports importing and exporting localization data in the Apple String Catalog (.xcstrings) format.'
image: '/img/blog/apple-xcstrings-support/apple-light.webp'
authors: [jcizmar]
tags: ['tolgee', 'apple', 'xcstrings', 'localization', 'format']
---

import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';

<ThemedImage
alt="Apple String Catalog Support Blog Image"
sources={{
light: useBaseUrl(
'/img/blog/apple-xcstrings-support/apple-xcstrings-light.webp'
),
dark: useBaseUrl(
'/img/blog/apple-xcstrings-support/apple-xcstrings-dark.webp'
),
}}
/>

We’re excited to share that Tolgee now supports the [Apple String Catalog (.xcstrings) format](/platform/formats/apple_xcstrings), a modern localization format for Apple platforms.

<!--truncate-->

This means you can now import and export your localization files in the .xcstrings format, streamlining your workflow for iOS, macOS, and other Apple ecosystem apps.

Apple String Catalog (.xcstrings) is a structured JSON-based format that improves localization handling with features like pluralization and rich metadata. With Tolgee’s support, you can now manage your localized strings seamlessly.

Whether you’re developing apps for iPhone, iPad, macOS, or any Apple platform, simply upload your .xcstrings files to Tolgee, make your edits, and export them back—ready for use in your Xcode projects.

Try it out and let us know what you think! Your feedback helps us improve. Happy localizing!
88 changes: 88 additions & 0 deletions platform/formats/apple_xcstrings.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
id: apple_xcstrings
title: Apple String Catalog (.xcstrings)
sidebar_label: Apple String Catalog
---

Apple String Catalog is the latest Apple approach to localization for Apple platforms.
We recommend using it in favor of XLIFF since this format gives you
better control over the strings and their translations.

Tolgee supports simple values as well as plural values.

Example of a Stringsdict file:
```json
{
"sourceLanguage": "en",
"version": "1.0",
"strings": {
"dog_count": {
"localizations": {
"en": {
"variations": {
"plural": {
"other": {
"stringUnit": {
"state": "translated",
"value": "I have %lld dogs."
}
}
}
}
},
"cs": {
"variations": {
"plural": {
"one": {
"stringUnit": {
"state": "translated",
"value": "Já mám jednoho psa."
}
},
"few": {
"stringUnit": {
"state": "translated",
"value": "Já mám %lld psi."
}
},
"other": {
"stringUnit": {
"state": "translated",
"value": "Já mám %lld psů."
}
}
}
}
}
}
},
"hello": {
"en": {
"stringUnit": {
"state": "translated",
"value": "Hello!"
}
},
"localizations": {
"cs": {
"stringUnit": {
"state": "translated",
"value": "Ahoj!"
}
}
}
}
}
}
```

We recommend using the semantic keys format as in the examples above. That enables you to change the base values without
modifying the key and doesn't suggest keeping the keys in sync with the base language translation.

import ApplePlaceholders from './components/_apple_placeholders.mdx';

<ApplePlaceholders />

import Importing from './components/_general_importing.mdx';

<Importing />
1 change: 1 addition & 0 deletions sidebarPlatform.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ module.exports = {
'formats/csv',
'formats/xlsx',
'formats/apple_strings',
'formats/apple_xcstrings',
'formats/apple_xliff',
'formats/android_xml',
'formats/compose_multiplatform_xml',
Expand Down
Binary file not shown.
Binary file not shown.