Amanuens

Search
»

Administrators


Developers


Translators

Android will run on many devices in many regions. To reach the most users, your application should handle text, audio files, numbers, currency, and graphics in ways appropriate to the locales where your application will be used.

Amanuens lets you easily manage Android applications localization.

Localization Prerequisites

It is good practice to use the Android resource framework to separate the localized aspects of your application as much as possible from the core Java functionality. You can put most or all of the contents of your application's user interface into resource files. Once you externalize your application resources, you can access them using resource IDs that are generated in your project's R class.

In Java code it will look like this:

lblMessage1.Text(R.string.message_text);

In layout.xml it will look like this:

<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center_horizontal"
    android:text="@string/title_text"
    />

All your resources must be grouped into .xml files in an appropriate directory structure. For string resources, for example, you will have a strings.xml file inside a res/values directory:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">Hello, L10N</string>
    <string name="title_text">Internationalized application</string>
    <string name="message_text">Welcome</string>
</resources>

You will have a values directory for every locale you want your application translated into. In Italian, for example, you will have a res/values-it/strings.xml file containing:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">Ciao, L10N</string>
    <string name="title_text">Applicazione internazionalizzata</string>
    <string name="message_text">Benvenuto</string>
</resources>


Amanuens is able to automatically discover string resource files in your source code repository and generate the localized files for translation.

Managing Updates

Every time you update your resource files Amanuens will be able to identify newly added and/or modified strings to be translated.

Further Reading

To get more details about localization in Android applications, please refer to the following articles:


Getting Started with Amanuens

Make sure all of your existing .xml files containing both strings to be translated and original values are committed in your source code repository (Amanuens will generate missing files automatically). To start translating your application you can continue reading on how to configure projects in Amanuens.

Go to Amanuens.com. ©2010-2012 Threeplicate Srl. All rights reserved.

Powered by ScrewTurn Wiki.