O'Reilly logo

Android Programming for Beginners by John Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 27. Going Local – Hola!

This chapter is short and simple, but here you will learn to make your app accessible to millions of potential users. In this chapter, we will see how to add additional languages. This is made really easy because we have been using String resources for the text in our app.

In this chapter, we will:

  • Learn the basics by building a very simple app that uses English, Spanish, and French
  • Add Spanish to the Where it's Snap app by adding a single text file

The Localization mini app

Create a new project and call it Localization. Keep all the project settings at their default values. We don't need to do any Java coding for this project.

Preparing the layout

Edit the activity_main layout file by copying and pasting the following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required