Launching your Android App with support for different languages is essential for Apps going global. The internationalization and localization of Android Apps is easy when working with Android Studio.

Pre-localization

Before we get our App ready for localization, the first thing to do is internationalization. Basically, we need to externalize all the hard-coded UI strings into an xml file and put it under the “res/values” folder of our project. Next, we could create alternative strings.xml files, each stored in a locale-specific resource directory, based on our target languages. What we’ve done so far can be redeemed as the internationalization engineering part if our App is developed with all the strings hard coded. However, Android developers with internationalization mindset would not build the App this way but will put all the strings into the resource folder for future localization. More detailed information on how to do pre-localization engineering can be found in the Android Development Documentations.

Once we have finished the externalization, our App is ready for localization. Basically, there are two simple ways to do this. First, add new locales to externalized strings under the res > values folder and get these strings.xml files with locales transferred to translators or editors. The other way is localizing with plugins, which will be explained in detail in this blog post.

Why plugins?

Before we start our localization journey, I’d like to mention why localizing with plugins would be cool and in which way can it outperform the first localization method.

The best part about localization with a plugin is that localizers do not need to manually add the string files and send them out for translation. With a plugin installed, we can automate the process of translation and generating resource files within just a few clicks. The other cool aspect is that, with MT implemented with these plugins, users can sometimes customize the MT engine leveraged by the plugin, making the localization more relevant to a specific locale. Moreover, most plugins support a variety of locales which can meet your needs most of the time.

Tutorial

To illustrate how it works, I will use the Android App called Minimal Todo. It is a very light and useful app, allowing you to add todos easily and quickly. The code is very clean and well organized and has been partially localized. When we first downloaded the source file of this App, for localization purpose, we deleted most reference string files and de-localized it to make it more “raw”.

There is more than one plugin out there that can be used for localization purpose, in this case, I chose the one called “AndroidLocalize” and I’ll show you how to work with it in the video below.

Summary

As mentioned at the end of the video, this plugin is more like a black box by using which you cannot tell which MT engine it is using. This would be potentially problematic if you’re quite concerned about data security. Although there are plugins allowing configuration of MT engines, the basic idea is the same: leveraging MT for translation. This means, once the translation has been automatically completed and the App has gone through functional testing, the App cannot be released right away because of the possible issues with translation quality. By employing plugins during localization, we have to include human editors to control the final quality of translated strings.

Although we can see some downsides working with plugins, the advantages of a plugin like AndroidLocalize are obvious too. It helps to save the cost and time and removes many tedious steps in the localization process, such as copying string.xml files, adding locales to each file, translating manually, etc. It is so easy to pick up that even if you’re not an engineer you can still complete the task by yourself.

For the overall information of our Android App Localization project, please click here.