Adding More Languages

Now you can add support for more languages, starting with German.

1. With the help of a native German speaker, translate your string resources file, or use the text in Listing 11.4. Place this text into the res/values-de/strings.xml file. For the title of the app, instead of a direct translation, use “Mit Rückenwind,” which means “having a tailwind.”

Listing 11.4 Translating the String’s Resources into German

<?xml version="1.0" encoding="utf-8" ?><resources>    <string name="app_name" >Mit Rückenwind</string>    <!-- Activity Titles -->    <string name="title_activity_timer" >Zeitnahme</string>    <string name="title_activity_settings" >Einstellungen</string>    <string name="title_activity_routes" ...

Get Learning Android™ Application Programming: A Hands-On Guide to Building Android Applications 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.