Paul de Lange
Paul de Lange

Reputation: 10633

Parse Android xml file instead of iOS .strings

So as mobile developers, every time we translate one of our apps we have to translate both Android and iOS strings files. These files contain 90% of the same strings just the file is in a different format.

Does anyone know if there is an NSLocalizedString override to read from Android compatible .xml files? or if this is even possible?

Alternatively, is there a command line tool to convert between the two formats?

Upvotes: 6

Views: 3604

Answers (5)

xmedeko
xmedeko

Reputation: 7812

Try Twine - a robust project for converting resources.

Upvotes: 0

BdR
BdR

Reputation: 3048

For a recent project which already had 19 translations, I was also looking for a script to convert the XCode Localizable.strings files to Android Eclipse format.

I found convertLocalizable.rb but I can't work with ruby, so I've created a Javascript based on it, see link below. You have to cut and paste each file but it works great.

Javascript XCode Localizable.strings and Android strings.xml convertor

Upvotes: 1

Tim
Tim

Reputation: 8606

This does what you need, but not from the command line.
http://localise.biz/free/converter/ios-to-android

The full system has an API though. If you register you'll be able to pull your translations into .strings or Android XML files from the command line, or programmatically via a simple script.

Upvotes: 10

Eric Baker
Eric Baker

Reputation: 357

Here's a simple script that will generate iOS Localizable.strings from Android strings.xml files.

Upvotes: 0

Paul de Lange
Paul de Lange

Reputation: 10633

So it turns out this kind of tool doesn't exist. I created a toolchain and posted it here.

If there is activity I will develop it further.

Upvotes: 1

Related Questions