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 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 hardcoding strings in our code directly as we have done so far throughout the book.

In this chapter, we will do the following:

  • Make Snake multilingual by adding the Spanish and German languages.
  • Learn how to use string resources instead of hardcoding text.
  • Run the game in German or Spanish.

Let's get started.

Making the Snake game Spanish, English, or German

First, we need ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.