O'Reilly logo

Learning AndEngine by Martin Varga

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

Localization

When we speak about application or game localization (or L10N, which means L followed by 10 letters and N), we generally mean supporting multiple languages. Another term is internationalization (or I18N), which means adapting the game to different regions. An example of I18N would be supporting both metric and imperial systems of units or supporting multiple date formats.

Localization in Android is very simple. The first step is to keep all the strings separate from the code. Instead of hardcoding Hello world!, we put this string into an XML resource file called strings.xml. This file is located at res/values/.

Tip

Keeping the strings separated from the code is a good practice even when we support only one language.

When we created the ...

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