Translate Android .xml files

What are Android .xml files?

Android .xml files are language files used by Android developers to localize Android apps. It uses a XML file specifically formatted for Android devices. XML stands for “eXtensible Markup Language”.

WebTranslateIt is a software localization platform that can help localize Android .xml files.

Android .xml file example

Here’s an example of Android .xml file. WebTranslateIt supports string, string-array and plurals structures. The comments in the XML files will be imported as instructions.

<?xml version="1.0" encoding="utf-8"?>
  <string name="loginPrefs">LOGINPREFS</string>
  <!-- The name used to login on the site -->
  <string name="user_key">user</string>
  <string name="password_key">password</string>
  <string name="photoKey">photo</string>
  <string name="videoKey">video</string>
  <string name="string1">a &lt;a href="">link&lt;/a> (HTML escaped).</string>
  <string name="string2">a <a href="">link</a> (HTML not escaped).</string>
  <string-array name="planets_array">
  <plurals name="numberOfSongsAvailable">
    <item quantity="one">Znaleziono jedną piosenkę.</item>
    <item quantity="few">Znaleziono %d piosenki.</item>
    <item quantity="other">Znaleziono %d piosenek.</item>

Empty strings

The Android framework includes a language fallback. A language fallback is a system that falls back to use the text from the source language if the target text is not present. If a segment is left empty in WebTranslateit we won’t export it in your language files so that the fallback mechanism can work.

However if you proofread an empty translation in the translation interface the file generated by WebTranslateit will contain that empty segment because we consider you intentionally left that segment blank and want a blank text as a translation.

Magic Comments

This file handler support the following magic comments:

  • Comments containing [MAXCHAR=xx] will set a max character limit to xx. Example: <!-- [MAXCHAR=20] -->
  • Comments containing [LABEL=xxxx] will assign the label to xxxx. Example: <!-- [LABEL=new feature] -->

How to Translate a Android XML File?

It is easy to translate a Android XML file with WebTranslateIt. In a project, upload your source Android XML file in the File Manager and translate it on the Translation Interface.

The tools included in WebTranslateIt, such as Batch Operations, the Translation Memory or Machine Translation can help you translate that file automatically, faster and cost effectively.

More Information

Related Platforms