Welcome to Allonsy! A blazing-fast, works out of the box script that automatically downloads translations from public Google Sheets and exports them into platform-specific localisation files for Android and iOS.
No more tedious copy-pasting or manual exports—just run Allonsy, and let it magic do its thing! 🔮
- Fetch Translations Automatically 🏁 Downloads a Google Sheet as a CSV file without you lifting a finger.
- Generate Android and iOS Localization Files 📱 Converts the CSV data into proper Android and iOS formats.
- Skip Blank Translations 🚫 Ignores empty translations so your localisation files stay clean.
- Ignore Commented-Out Rows 📝
Detects rows that start with
//and skips them. - Smart Formatting Detection 🔍
- If a string has
{}placeholders →formatted=falseis applied (for Android). - If a string has
%s, %d, %1$s→ kept as it is.
- If a string has
Good news! You don’t need to install anything extra—Allonsy runs on pure Python 🐍
git clone https://github.com/delacrixmorgan/allonsy-python.git
cd allonsy-python For convenience, there are two Python files that store all the necessary variables and configurations:
- spreadsheet_id = The unique identifier of your Google Sheet.
- sheet_name = The name of the sheet you want to export.
- export_dir = The directory where the localisation files will be saved.
- platform = Choose between
androidorios.
Your spreadsheet ID is the long string of characters in the URL of your Google Sheet:
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit#gid=0
Copy the SPREADSHEET_ID value and paste it into your script.
| Screen | Element | Key | Base Text | zh | {ISO_639_LANGUAGE_CODE} |
|---|---|---|---|---|---|
| app | name | app_name | King's Cup | 国王之杯 | ? |
Here's a Google Sheet sample on how you structure your strings and its different locales. For the locale column, just use the ISO 639 Language Codes.
from allonsy import export_translations
spreadsheet_id = "YOUR_SPREADSHEET_ID"
sheet_name = "YOUR_SHEET_NAME"
export_dir = "app-android/src"
platform = "android"
export_translations(spreadsheet_id, sheet_name, export_dir, platform) from allonsy import export_translations
spreadsheet_id = "YOUR_SPREADSHEET_ID"
sheet_name = "YOUR_SHEET_NAME"
export_dir = "app-ios/src"
platform = "ios"
export_translations(spreadsheet_id, sheet_name, export_dir, platform) It's that easy!
python allonsy-android.py
python allonsy-ios.py 🎉 Boom! Your string translations are now ready.
🔹 Scenario: Blank Language Column? ✅ Ignored!
If a language column is empty, Allonsy will skip it—no more clutter!
🔹 Scenario: Commented-Out Rows? ✅ Ignored!
Any row starting with
//is ignored, keeping your translations organized.
🔹 Scenario: {} in Strings? ✅ formatted="false" added!
If a string contains
{}placeholders (e.g.,Hello {name}), Allonsy adds `` for Android.
🔹 Scenario: %d, %s, %1s in Strings? ✅ Kept it!
If a string uses Android-style placeholders like
%d,%sor%1s, Allonsy keeps formatting enabled.
For the Google Sheet to be downloaded through the script, you will need to make that spreadsheet to be set as **public **.
Reason being, you will need more setup like creating a service in Google Cloud Console to get your own
google-services.json.
For Allonsy, the intention is to just keep it simple. It's even written to use the openly supported .csv file
format rather than the conventional Excel's .xlsx. So that you can just easily run out of the box, rather than
fiddling with installing 3rd party libraries and Google Cloud Console setup.
Inspired by Doctor Who, "Allons-y" means "Let's go!" in French. This script is all about speed, automation, and making your life easier.
🚀 So, what are you waiting for? Let's go—Allons-y! 🚀
