How to localize your Android app

Updated May 10, 2021

Android Localization Tutorial

Localizing Android

Step-by-step Android localization

1. First, identify the texts to be translated.
These are your user-facing text labels, buttons, and other visible parts of your app's user interface.
2. Next, add them to a strings.xml file for your translators to work on.
At runtime, your Android app will show the correct translation to the user based on their device's language preferences.

Let's see how Android localization works in practice.

Localization Q&A by Babble-on

More questions:

Translate that Android app

Once you've completed this tutorial to internationalize your app, please let us translate your strings!
Bookmark this page and come back for a free price quote.

Translate my app

Categories

Preparing your Android app for localization

Create /values/ directories

Start by adding values directories to your resources so that Android knows you have localized your app.

  1. By default, Google's Android SDK tools create a /res/ directory at the top level of your project. Take a look inside this directory and you will notice there are some default files as well, including res/values/strings.xml.

    It's always good practice to externalize your string resources this way rather than hard-coding strings as you program. Doing this will also make it a snap to internationalize your app.

  2. Next, create additional /values/ directories inside /res/ for each language you plan to add. Each of these directories should include a hyphen followed by the ISO language code. For example, /values-fr/ would contain the strings for French. For regional versions, like French Canadian, you include the region code prefixed by the letter r: /values-fr-rCA/

    It should look something like the examples here.

  3. When a user running Android in a different language runs your app, Android will check these directories to see if you have a localization ready. If so, your translated texts will appear. If not, Android will use the default texts in the /res/values/strings.xml file.

Default (English), res/values/strings.xml:


<?xml version="1.0" encoding="utf-8"?>
<resources>
	<string name="title">Maps</string>
	<string name="open_in">Open in Google Maps</string>
</resources>

French, res/values-fr/strings.xml:


<?xml version="1.0" encoding="utf-8"?>
<resources>
	<string name="title">Plans</string>
	<string name="open_in">Ouvrir dans Google Maps</string>
</resources>

Japanese, res/values-ja/strings.xml:


<?xml version="1.0" encoding="utf-8"?>
<resources>
	<string name="title">マップ</string>
	<string name="open_in">Googleマップで開く</string>
</resources>

Using string resources as you code

If you haven't already externalized your strings, make sure you do. This means replacing any hard-coded strings with calls to Android's built-in R.string

Standard code example


// Call a string resource from your app
String open_in_maps = getResources().getString(R.string.open_in);

// In a method that requires a string
TextView textView = new TextView(this);
textView.setText(R.string.open_in);

String within another XML file


<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/open_in" />

Calling a string from within another XML file requires a slightly different syntax. Refer to a string resource as @string/

Send for translation

And, voilà. Your app will soon speak enough French to understand the word "voilà!"

You have the default strings.xml file you need to send to your Android translation team! Start translating your app right away using this free Multilingual Mobile App Glossary.
It contains common translations for mobile app terms, including things like Settings, Tap, etc. in a dozen languages.

Your translators should return to you one file for each language using the language code the values directory. That is, for French you'll receive an values-fr/strings.xml file, for Chinese, you'll get back something like values-zh/strings.xml.

IMPORTANT: When you receive the strings.xml files back from the translators, simply place them into the correct values directories and Android will do the rest! Do NOT rename the files or Android won't find them.

See also

Language Codes
Complete list of ISO language codes to use for your Android app. Use these to name your values-xx folders.
Common Translations for Android apps
This page contains many common translations for mobile app terms, including things like Settings, Tap, etc.

Tips for how to localize your Android app

Google Android Translator San Francisco

Localize Android apps into the right languages

Using Google Play, you've probably already noticed users from all over the world downloading your app. How many more users can you get by translating and localizing your Android app into another language? Into two, or more? Once you've created the strings.xml file using the tutorial above, it's very simple to localize your Android app for the Google Play or Amazon Appstore.

From our FAQ: Which languages are worth localizing into? »

Is your App Store description going to sell?

Writing a description of your app for the App Store description is often difficult for even the best developers. How do you make your app sound great without sounding like a door-to-door salesman? How will the description translate when you localize your Android app, and are there any issues to consider for new markets? Babble-on helps developers with both the copywriting and translation, so we know this subject very well. Ask us for help.

Check it out: Tips for writing your Google Play Appstore description »

Tell your users in their language.

A user can set their preferred language by going to Settings -> Language & keyboard - System Language. Once the language is set, Android will display all text, including the app's name on the home screen, in the user's local language.

Professional Android localization

We love Android apps and are excited to help you localize your projects and test them in multiple languages. Whether you need your Android app localized into Spanish, Japanese, Russian or any other language, Babble-on is ready to help.

Pseudolocalization —  testing you've found every string

Once you've finished preparing your .strings file you're probably having doubts that you actually managed to find every hard-coded string in your app. What about those error messages or that plug-in you use? Well, there is a quick way to check. It's called pseudolocalization!

Pseudolocalize my files

Plus get free cost estimate

Essentially, you use a program to substitute all the English (source) phrases with a fake language. Load up this gibberish Localizable.strings file into Xcode and then run your app. Check every screen and make sure all the text appears as the pseudo-localized text rather than your original. If you can't spot any missing strings, you're good to go.

Tip: Pseudolocalization is also a great way to make sure you've left enough room in your GUI for other languages. A common rule of thumb is that non-English languages are 30% longer, so tiny buttons and titles may not fit when you localize. Pseudolocalization can help you spot those cramped spaces too!

Start translating your app right away using this free Multilingual iOS Term Glossary. It contains common translations for mobile app terms, including things like Settings, Tap, etc. in a dozen languages.

Multilingual Android apps are what we do

Tiny Tiger Android game Tinder localized into 29 languages Shazam Android Localization Living Earth Weather App Localization Sky Guide for iPhone and iPad

Talk to a real translator.

Interested in professional Android app localization from a team that cares about making apps awesome? Unlike automated or cloud translation services which will translate your "bold" text as brave and "Archive" as a noun without considering it might be a verb, Babble-on is a dedicated team of translators that put as much care into localization as you do into app development.

You can talk to us about your project the whole way through, not just upload your strings and cross your fingers.

We'd love to help get your Android app localized.

Contact us

For real.