A tool to generate app translation (Localizable.strings, etc.) using Google Sheets API.
- It makes use of the official Google Sheets API
- It uses Google Service Account to give and revoke permissions
- It is super safe, using private/public key cryptography
- It is more integrated with Xcode and shows warnings during build
- It is centralized and possible to update with CocoaPods
- It's written in Swift :)
- Create a new Google Sheet according to previously used template, it is:
. | name/key | en | pl | ... |
---|---|---|---|---|
GENERAL | GENERAL_LOGOUT | Logout | Wyloguj | ... |
... | ... | ... | ... | ... |
Check out sample translation sheet here
- Click on Share button, and open Advanced panel
- Invite @sheetstranslator.iam.gserviceaccount.com with view permissions
- Copy spreadsheet ID
Now SheetsTranslator has an access to this sheet and is ready to use it!
- Add this line to your Podfile and run pod install
pod 'SheetsTranslator'
- Add this script as a build phase to your project
"${PODS_ROOT}/SheetsTranslator/sheets" -s <your sheet ID> -c <your credentials path> -o <your app directory>/Resources
-s, --sheet
- Spreadsheet ID (required)-c, --credentials
- Credentials path (required)-o, --output
- Output translation path (or current directory if not provided)-t, --tab
- Sheet tab name(or first one if not provided
- Replace your sheet ID and output directory
- Build the project
This project uses code from third-party libraries licensed under MIT licence.
- SwiftyRSA by Scoop - Encryption/ASN1Parser.swift
- Guardian.swift by Auth0 - Extensions/Data+Base64URL.swift