Android Localization Support Different Language Tutorial

Android Localization allow you to support different or multiple language on many android devices. It will automatically change according to the device default language if the android application had define the string on that language. Android Localization is the act of changing string into different languages. Therefore, it will detect according to the string resources  in the mobile application. In this tutorial, I will give you all the steps to create the android localization to make it support multiple language in the android app.

Android Supported Language List

http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android

This link provide a list of supported language locales on the android operating system.

Creating a New Project

1. Open Android Studio IDE in your computer.
2. Create a new project and Edit the Application name to “LocalizationExample”.
(Optional) You can edit the company domain or select the suitable location for current project tutorial. Then click next button to proceed.
3. Select Minimum SDK (API 15:Android 4.0.3 (IceCreamSandwich). I choose the API 15 because many android devices currently are support more than API 15. Click Next button.
4. Choose “Empty Activity” and Click Next button
5. Lastly, press finish button.

Create Android resource file

Add a new resource file by right click the res package > New > Android resource file.

android localization

In the available qualifiers list select Locale and Click >> Button. Select the language u want for example I select Chinese language then click Ok.

android localization

Edit strings.xml and strings.xml(zh)

You will see new strings.xml (zh) created in your values folder. Insert below code to the specify file.

strings.xml

strings.xml (zh)

Edit activity_main.xml layout

Go to your activity_main xml and edit your textView.

Run your Project

Now, you can start your project in your android device. You need to go Settings to change your default language to Chinese so you can see the text are change according to the settings.

(Android Localization)

Source Code

 

(Visited 395 times, 1 visits today)
Advertisements

Kristofer Ng

A crazy android and web developer. Passion on developing android application and exploring new technology as a hobby.

You may also like...

1 Response

  1. Summer Wine says:

    If you want to efficiently translate an app, a website, a game, or another software product, check out the localization management platform https://poeditor.com

    It’s very useful for collaborative localization projects.

Leave a Reply

Your email address will not be published. Required fields are marked *

GET YOUR EBOOK FOR FREE

Unlock free ebook "Beginning Programming ALL-IN-ONE Desk Reference for DUMMIES" now!

We will send a copy to your email