Ruby scripts to convert between CSV and iOS localisation files, plus a diff tool to verify nothing was lost.
Three small helpers for managing iOS app localisations:
csvToLangFiles.rb— generateLocalizable.stringsfiles from a master CSVlangFilesTocsv.rb— export existingLocalizable.stringsfiles to a CSVlangToLangCompare.rb— compare two localisation sets to verify nothing was lost
- Ruby 2.7+
Generates .strings files from a localization.csv file based on the current folder hierarchy.
- Update the
"CHANGE ME TO YOUR OUTPUT DIRECTORY"string inside the script with your target output path. - Copy your
localization.csvfile into theLocalisationAutomation/folder. - From a terminal inside
LocalisationAutomation/, run:ruby csvToLangFiles.rb localization.csv
Creates a localization.csv from existing .strings files. Typically used once per project to bootstrap the CSV.
- Create a
CurrentLocalization/folder insideLocalisationAutomation/. - Copy all relevant
*.lprojfolders intoCurrentLocalization/— each should contain only theLocalizable.stringsfile. - From a terminal inside
LocalisationAutomation/, run:ruby langFilesTocsv.rb
- The generated
localization.csvappears in theGenerated/folder.
Compares the original localisation with a generated one to verify nothing was lost or broken. Useful as a sanity check when iterating on the conversion scripts.
- Create a
CurrentLocalization/folder insideLocalisationAutomation/. - Copy all relevant
*.lprojfolders intoCurrentLocalization/. - Place the generated localisation inside
LocalisationAutomation/Generated/with the same structure asCurrentLocalization/. - From a terminal inside
LocalisationAutomation/, run:ruby langToLangCompare.rb
- The diff appears as
localization_diff.txtin theGenerated/folder.
Released under the MIT License. See the LICENSE file for details.
Copyright © 2026 Dmitry Protopopov (github.com/Dimajp).