Localize your app consistently on Android and iOS

Claudia Luque Fernández
Busuu Tech
Published in
4 min readDec 13, 2016

--

Localizing…what is that? Localizing consists of the ability to handle text, graphics, currency or numbers according to the locale where the app is being used. In other words, adapting your app to the user’s device language.

Why is this important? The main reason is the more users you can reach, the better.

Even though this is important, not all apps are localized to display the UI in multiple languages. In fact, when it comes to shipping a product on different platforms (iOS and Android for instance), it is not straight forward to keep consistency between both apps. One of the most annoying things when we need to add a new language to our app is creating a new localization file and inserting all the content manually. In addition, when we have several teams working on different platforms it takes the time to coordinate, provide the same content, images, formats to use, and also let them know and schedule changes when some content needs to be updated.

In order to make our life easier, there are some tools we can use to help us handle multiple translations in our app. Depending on your company resources or the way you work you will find one more suitable than the other.

So far, I have had the chance to use 2 of these Localization tools: Localio and Crowdin, both of which are amazing.

They have the same purpose: providing an easy UI to write content online and then generate and download localization files in many languages and platforms!

Localio

I really like the simplicity of this one, created by a former colleague and an amazing developer Nacho :).

My favourite thing is that you only need to create a Google Sheets file and share it with the people involved in translating the app. It is very simple and fast to check out. You can see translations of the content all together and compare them. Thus, we focus on creating quality content, the client/translation team can verify the result and when everyone is happy, we just do the magic to execute a command and download the translations.

Crowdin

This one is a more powerful and agile platform, and it is also the platform we use here at busuu. It makes more sense to use it when your company has a translation team and you want to keep your translation process robust and safe. This is more like a CMS that lets you upload localization strings from your branch in order to add new content or update the existing content. The interesting thing is, if your team is working on different branches, they all can upload localization strings and Crowdin creates this branches to avoid conflicts. It also has a rich UI which shows you when translations are complete and approved by the admin. Translations using git-flow!

As an example, below you can see the main panel for our Android project. After submitting new strings, we will look at this screen to quickly spot if we already have them available in all languages.

Crowdin UI displaying the main languages panel.

If you want to see a bit of the process under the hood, the next screenshot displays a list of strings created in English. When we select any of them Crowdin will display all the available translations in other languages.

Crowdin UI displaying “Intermediate B1” string and its translations.

Once we see all the content is available in all languages, we just need to run a script to download the localized files (for the Android app, which I work on, it will be several strings.xml files).

Using the CrowdIn CLI help us to automate this, placing the files in the right places in our project and allowing us to integrate localization into our build tools, so automated builds also contain up to date localisation! We wrapped the call to download translations in a quick shell script to make it easy for everyone in the team to download the translations for the current branch, making it super easy to stay up to date:

claudia$./download_translations.sh 
Building ZIP archive with the latest translations
Extracting: `/busuuAndroidApp/src/main/res/values-ar/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-zh/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-en/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-fr/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-de/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-id/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-it/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-ja/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-pl/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-pt/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-ru/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-es/strings.xml’
Extracting: `/busuuAndroidApp/src/main/res/values-tr/strings.xml’

The content of the download_translations.sh script is quite simple. It basically runs crowdin-cli (which can be installed as a ruby gem) with the download option and git symbolic-ref to specify the branch that needs to get the strings from:

branch_name=$(git symbolic-ref --short HEAD 2>/dev/null)
branch_name="AA-${branch_name##*/}"
crowdin-cli download -b $branch_name

Conclusion

There is no excuse now to support multiple languages, either in a personal or business app, using these tools you can handle all this in a graceful way. Then it is up to you which one you prefer. Personally, I have used them both in production environments and I can’t imagine working without them.

--

--

Software Enginner — Android passionate — Runner addict — Photography lover