Chapter 15. Android Localization -Hola!

This chapter is quick and simple but what we will learn to do can make your game accessible to millions of more potential gamers. We will see how to add additional languages. We will see the "correct" way to add text to our games and use this feature to make the Snake game multilingual. This includes using String resources instead of hard-coding Strings in our code directly as we have done so far throughout the book.

In this chapter, we will:

  • Make Snake multilingual by adding the Spanish and German languages
  • Learn how to use String resources instead of hardcoding text

Let's get started.

Making the snake game Spanish, English and German

First, we need to add some folders to our project- one for each new language. ...

Get Learning Java by Building Android Games - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.