AutoTranslate is a macOS app built with SwiftUI that simplifies the process of creating, editing, and updating Xcode .xcstrings localization files. It allows you to input source texts and automatically generate translations into multiple target languages using Appleβs Translation framework.
- Automatically translates text from a source language (e.g., Spanish) into several selected target languages.
- Supports multiple languages simultaneously, including Dutch, French, English, German and Portuguese.
- Open existing
.xcstringsdocuments: Load and update your current localization files. - Save & Export: Save changes to an open document or export new ones with a single click.
- New documents: Start fresh with a new translation file at any time.
- Automatically parses text input in the form
key = value. - Detects and preserves keys when creating or updating translation documents.
- Supports plural syntax with forms like
key[one] = valueorkey[other] = values.
- Supports full plural variation structures according to Appleβs .xcstrings format:
zero,one,two,few,many,other - Plural entries are automatically parsed and preserved in the resulting localization document.
- Each plural form is translated individually per target language.
count[one] = 1 value
count[other] = %d values
- Displays the current file name and translation state.
- Provides visual feedback during translation (progress indicators and button states).
- Automatically saves translations for all selected languages.
- (β+N) β New document
- (β+O) β Open document
- (β+T) β Translate document
- (β+S) β Save document
Follow these steps to set up and run the project locally:
- Clone the repository
- Open
AutoTranslateproject in Xcode - In the Project Navigator, select the project file (the top-level blue icon).
- Click on the
AutoTranslatetarget. - Navigate to the Signing & Capabilities tab.
- From the "Team" dropdown menu, select your developer team.
- Select My Mac as the run destination in the Xcode toolbar.
- Press Command-R (β+R) to build and run the app.
- Create or Open a Document
- Press Command-N (β+N) to start a new translation file.
- Press Command-O (β+O) to import an existing
.xcstringsfile.
- Enter Source Text
- Use the text editor to input strings. Follow the
key = valuepattern:
greeting = Hola Mundo
farewell = AdiΓ³s
- To add plurals, use bracketed forms after the key:
apple[one] = 1 manzana
apple[other] = %d manzanas
Note
The app supports the following plural keys: zero, one, two, few, many, other.
- Select Target Languages
- Choose which languages you want to generate translations for (English, French, etc.) using the toggle list on the left sidebar.
Warning
The app will ask you to download the languages that are not installed in your machine.
- Translate
- Click Translate to automatically generate translations.
- Save or Export
- Press Command-S (β+S) to export the new file to a location of your choice or save changes in an existing file
AutoTranslate works with Appleβs .xcstrings format, structured as JSON for Xcode localization catalogs.
Each entry includes localized versions of strings under their language identifiers (e.g., "es", "en", "fr").