Swiftpack.co - Package - Liquidsoul/LocalizationConverter


Build Status

A simple command-line tool to convert Android strings.xml files into iOS Localizable.strings and Localizable.stringsdict files.


The tool can be installed using brew. All you have to do is run the following command:

brew install liquidsoul/formulae/l10nconverter


You need to pass the action to the tool to execute the conversion or get the usage help:

l10nconverter help

You can convert a android strings directory with this command:

l10nconverter convertAndroidFolder android/ --output=ios/

The tool expects the folder to have the following layout:

├── values
│   └── strings.xml
└── values-fr
    └── strings.xml

Which is the standard Android resources layout. See the Android String Resources documentation for more details.

It will output the following folder tree containing iOS localization files:

├── Base.lproj
│   ├── Localizable.strings
│   └── Localizable.stringsdict
└── fr.lproj
    ├── Localizable.strings
    └── Localizable.stringsdict

The presence of stringsdict files will depend on the existance of plurals in your localization. None will be generated if you do not have plurals keys. You can look at the Apple documentation for more information on plurals on iOS.

⚠️ Limitations ⚠️

Development information

The Makefile is the central point to run the different commands for this project.
To setup the dependencies and run the tests:

make install
make test

Note that this assumes that brew is installed.

The project uses the Swift Package Manager so you can use it directly to build and run tests on the project.

To generate a release build:

make release

This will output a binary in the release/ folder of the project.


Stars: 5
Help us keep the lights on


Used By

Total: 0


0.0.6 - May 7, 2017

  • split code into several modules
  • add dependency to Commander for command line arguments processing

0.0.5 - Sep 22, 2016

  • convert project to Swift 3.0
  • change toolchain to use the Swift Package Manager instead of a Xcode project

0.0.4 - Sep 14, 2016

  • add support for Xcode 8 / Swift 2.3
  • add --include-plurals option (#8)

0.0.3 - Aug 8, 2016


  • add a line feed at the end of generated Localizable.strings files


  • keys in generated Localizable.strings are now surrounded by double-quotes
  • add error handling to catch invalid android xml strings file

0.0.1 - May 29, 2016


  • allow to convert a single strings.xml files into a Localizable.strings file with a Localizable.stringsdict file if the source file contains plurals
  • allow to convert an Android strings resource folder into an iOS folder containing .lproj folders