ios/translation/scripts/Readme.md
Automate exporting localizable strings (XLIFF) from the MullvadVPN iOS project using xcodebuild.
This folder contains a Bash workflow that:
logs/ directory.build/, also git‑ignored)./mullvadvpn-app/ios/translation
├── locales
│ └── en.xliff
└── scripts
├── localizations.sh # Main Bash script
├── build # Ephemeral DerivedData or build scratch dir (ignored)
├── logs # Timestamped run logs (ignored)
└── README.md # You're here
cd ios/translation/scripts
chmod +x localizations.sh
./localizations.sh import # To import localizations into code
./localizations.sh export # To export localizations from code
By default the script uses values set near the top of the file (edit them before first run). You can override most settings via environment variables or CLI flags (see below).
The script can loop languages. Set EXPORT_LANGUAGES to a comma‑separated list, e.g.:
Note: In most cases, exporting only the base language for translation is sufficient.
EXPORT_LANGUAGES="da,de,en,es,fi,fr,it,ja,ko,my,nb,nl,pl,pt-PT,ru,sv,th,tr,zh-Hans,zh-Hant" ./localizations.sh export
XLIFF output will be placed under:
locales/
en.xliff
sv.xliff
de.xliff
fr.xliff
(Actual filenames depend on what xcodebuild -exportLocalizations emits.)
You can import translations back into code for multiple languages in one run. Place your translated .xliff files in the locales/ folder, named by their language code:
locales/
en.xliff
sv.xliff
de.xliff
fr.xliff
Run the import command:
./localizations.sh import
All stdout/stderr from each run is captured using tee into logs/ with a timestamped filename, e.g.:
logs/
build_20250723_142915.log
build_20250724_094401.log