How to Localize Mobile Apps and Expand Internationally in 2023?


Localizing mobile apps, smartphones Transphere

Table of Contents

Before you localize mobile apps, you should have a basic understanding of the market and its value. For instance, in 2021, Chinese mobile phone users used 26.3 apps per month and spent, on average, 5.1 hours daily on them. Unsurprisingly, these applications are primarily in Chinese.

After all, China sells many mobile phones to overseas countries each year. Let’s look at some of the major players in the industry.


  • Xiaomi has been the No. 1 mobile phone brand in India in terms of market share for years.
  • Transsion is the biggest mobile phone brand in Africa, with a total market share reaching 40%
  • Overseas markets contribute to more than 70% of sales to OnePlus.


As you can imagine, the apps on these phones are localized into different languages to cater to local needs.


What is a “localized” mobile app?


“Localized” refers to adapting an app’s content to local languages and cultures. Texts are usually extracted, translated, and imported into the original application environment.

Thanks to the localization process, language is no longer a barrier preventing local users from using products manufactured by foreign countries. In this context, a localized mobile app is perfectly adapted to the local market in language, culture, buying habits, payment methods, etc.


How to localize mobile apps?


In its simplest form, localizing mobile apps can be done in 3 steps. Dealing with the design layout, fixing hard-coded strings, and translating the strings.

Let’s look at a simple localization process with an Android-based app.


1. Design layout

Download Android Studio  and create a project using an empty template. Android Studio provides various types of components. You can drag and drop them to corresponding positions on the layout editor easily.

In the figure below, only text and button components are used.

2. Fix hardcoded text

In the next image, you can see yellow triangle alert icons in the Component Tree section. To know the reason for an alert, click on it. 


The alert is triggered because the text “TextView” in the text box is hard coded.

Just Icon

Hard coding consists of embedding text directly into the code of an application or software instead of getting the text from external sources.

Typically, hard-coded text can only be modified by changing the code and recompiling the executable, which is time-consuming.

Hard coding indicates that text is mixed with code instead of independently placed. Combining text with code is problematic for localization. 

For example, the entire code must be compiled from scratch to translate the text or only a string. To make matters worse, a new compilation failure, garbled characters, or other issues may occur.

That’s why hardcoded text automatically triggers an alert in Android Studio. To fix this issue, input the string into a separate file and reference the string in the code. In other words, separate the text from the code.

Click on Fix, and the dialog box shown below will pop up. 


As you can see above, the field Resource name indicates the name of the string, which is not displayed on the user interface (UI). Instead, the value of the string, the resource value TextView here, is shown. Click OK, and the string will be saved to the string.xml file as set for the File name field.

After all the hardcoded texts are processed, the strings will be stored in a separate file.

In Android Studio, you can choose to Analyze > Run Inspection By Name and enter Hardcoded text to search all the hard-coded text and fix them one by one.


3. Translate strings

In the Attributes section, click the button on the far right of text. The Pick a Resource page appears.

Click Open Translations Editor, and the following page is displayed.

Show All Keys pop up

You can finally localize strings on this page. In the image above, you can see 4 columns:

  1. The Key column lists the names of strings.
  2. The Resource Folder column lists the path to the file where the string is stored.
  3. The Untranslatable column includes a check box to tick if a string does not need to be translated (i.e., the app name).
  4. The Default Value column lists the strings. 

To add a language, click the globe icon on the left of Show All Keys and pick one.

Globe icon, localizing mobile apps Transphere

The image below shows the page after the strings are translated. As you can see, there is an additional column to the right containing the translated text.

Since the app name did not need to be translated, the Untranslatable check box was ticked


Then, in the file list of Android Studio, a new file appears—strings.xml (zh-rCN).

strings.xml generated automatically while localizing mobile apps


After a language is added, this file is automatically generated and contains all the strings in a given language. In our case, the app generated a strings.xml file containing Chinese strings, as indicated by the (zh-rCN).

Finally, the English UI text is replaced by the Chinese text.

English UI to Chinese Ui in a mobile app

How to localize mobile apps using open-source tools?


In the previous example, we localized strings using the Translations Editor built in Android Studio. Given the editor’s limited capabilities, you may need to use a more specialized tool if the content is complex.

The type of text boxes and buttons we dealt with are elementary. The complexity quickly compounds in an actual project, and this tool won’t be helpful. We used this tool for demonstration purposes only.

If you’d like to handle real scenarios, you can download and try an open-source app—it’s worth the effort.

Let’s check the process required to localize a mobile app using open-source tools.


1. Import the app source code from GitHub

You can find several types of open-source apps on GitHub. For more valuable resources, set the search conditions as follows:

  1. Android app.
  2. Appropriate size.
  3. Runnable (not libraries or plug-ins).

On GitHub, set the search conditions to:

  1. Language: Java (Most Android apps are written in Java), and add the keyword “app” (runnable apps are displayed).
  2. Pushed: After 2022-01-01 (Updated after January 1, 2022. If the app version is earlier than this date, it may be incompatible with the Android version of the mobile phone).
  3. Size: < 100000 (Limit the app size to an appropriate value).

This way, you can find a “to-do” tool.

Import this app on GitHub to the Android app development environment Android Studio, and you can get the app’s source code.

Copy the URL of this app, as shown below.

In Android Studio, import the open-source code on GitHub. (Choose File > New > Project from Version Control.)

Paste the copied URL.

In this way, the app source code is downloaded to Android Studio.


2. Translate the string file and apply

(This app has a Chinese edition. Delete the values-zh folder where the Chinese strings are stored first.)

Add the Chinese language, as shown in the following figure.

A folder named values-zh-rCN is generated. The string.xml file in this folder stores Chinese strings. Since no string is translated, this file is empty.

The string.xml file in the values folder stores the strings in the app’s default language (English). Copy this file to the values-zh-rCN folder to overwrite the existing file and translate the English strings to Chinese strings.

Import the string.xml file to memoQ. The built-in parser extracts the content to be translated. Translators can translate on memoQ directly.

After the translation is complete, export the file and import it to Android Studio. Apply the translated UIs and run the app.

The app’s UI is in Chinese.

In a real project, software localization is far more complex than described in this article. To localize mobile apps effectively you’ll have to learn a bite more.

However, the basic principles are similar. You can start with simple cases to have a basic understanding before moving on to more challenging tasks.


Propel Your Brand into

the Global Stage

At Transphere, we believe that the true measure of our success is the growth of our long-term partners. Reach out to our passionate members and start growing today!

Fill out the form to learn how we can help you grow.