Run the game in German or Spanish
Run the app to see if it is working as normal. Now we can change the localization settings to see it in Spanish. Different devices vary slightly in how to do this but the Pixel 2 emulator can be changed by clicking on the Custom Locale app
Next select es-ES and then click the SELECT 'ES' button in the bottom left of the screen, as shown in the next image.
Now you can run the game again in the usual way
You can add as many string resources as you like. Note that using string resources is the recommended way to add all text to all types of app including games. The tutorials in the book (apart from this one) will tend to hard code them to make a more compact tutorial.