Android XML

Localization format for web and phone apps, Android Studio, Google Play services

  • File extension: *.xml
  • Localization type: “android”
  • Pluralization: yes
  • Description: yes
  • Translations Upload: yes
  • Custom Attributes: yes

File Sample

<resources>
  <string name="identifier_1">String for translation 1</string>
  <string name="identifier_2" comment="Type string's context here">String for translation 2</string>
  <string name="identifier_3">String for translation 3</string>
  <string name="identifier_4" translatable="false">String for translation 4</string>
  <string name="identifier_5" maxLength="15"> String for translation 5</string>
  <plurals name="apples_count">
    <item quantity="one">%s apple</item>
    <item quantity="other">%s apples</item>
  </plurals>
</resources>

Attributes

Import as a hidden string:

<resources>
  <string name="identifier_3" translatable="false">String for translation</string>
</resources>

Custom Attributes

Max. Length characters for the translated string:

<string name="identifier_5" maxLength="15"> String for translation 5</string>

Comments

<resources>
  <string name="identifier" comment="Type string's context here">String for translation</string>
</resources>

Plurals

<resources>
  <plurals name="apples_count">
    <item quantity="one">%s apple</item>
    <item quantity="other">%s apples</item>
  </plurals>
</resources>

See Also

Was this article helpful?