Within the Localize dashboard we provide you with an ability to import and export phrases and translations in various file formats.
You can also import/export Glossary terms.
To see a general explanation of how importing and exporting works in Localize, click here.
To see a detailed overview of how you can use Localize to translate an Android app, click here.
UTF-8 File Format
Be sure that you are using the UTF-8 file format when working with the external files you are creating for importing purposes.
Learn how to use the Android XML file format to import/export content into/out of the Localize translation management system by watching this video.
Before importing, make sure your file adheres to the file requirements below.
Navigate to the File Import / Export: Import tab in your dashboard.
- Drag-and-drop a file to import into the box, or select a file to import.
- Select ANDROID XML under File Format.
- Select the language you are importing.
- Specify the import type: Phrases or Glossary terms
- Click the Submit button.
- Wait for the file to be uploaded.
- Success! View the file details to see how many phrases were created, updated, etc.
After importing a source language file, Localize will show the phraseKey along with the phrase in the Localize dashboard.
Android XML files for the source language must first be imported into the Localize dashboard so that the
Resource IDsfrom your app are added as
phraseKeysin the phrase in the Localize dashboard. Then upon subsequent exports, the
phraseKeyswill be maintained.
Exporting phrases for which there is no
phraseKeywill result in the source language string being used as the
Resource IDwhich is probably not a desirable outcome!!!
Navigate to the File Import / Export: Export tab in your dashboard.
- Select ANDROID XML under File Format.
- Select a filter which will determine which phrases get exported:
a. Published translations
b. Machine translations
c. Human translations
d. No translations
e. Needs human translations
- Select the language you are exporting.
- Specify the export type: Phrases or Glossary terms
- Click the Export button.
- Wait for your download to complete, then close the popup dialog.
Exporting Selected Phrases
Alternatively, you can filter exactly which phrases that you want to export on the Phrases and/or Glossary pages. Find out how...
Android XML is a format that's used to exchange data between participants in a translation project.
Use the following sample for guidance when creating your Android XML file for importing into Localize.
The following data is required:
<resources>element: parent element of all other elements that follow
<string name="string_ID">element: a string in your app
nameattribute is required, and is the resource ID of that string in your app.
<?xml version = "1.0" encoding="UTF-8"?> <resources> <string name="submit_button">Submit</string> <string name="first_name_field">First Name</string> <string name="last_name_field">Last Name</string> </resources>
Not available in Web projects
The Android XML file format is not available in Web-based projects, because it is a format traditionally used in mobile app or files-based development environments.
Localize supports plural forms of phrases in files that are imported and exported in a Mobile App project. Once in the dashboard, you can edit the various plural forms of the source phrase and translations.
See the Pluralized Phrases in Mobile App Projects doc for details.
You can read more about how Android apps handle plurals in the Sting resources doc.
For reference, here is a sample Android XML file with plurals:
<resources> <plurals name="numberOfAirplanes"> <item quantity='zero'>There were no airplanes in the sky today.</item> <item quantity='one'>There was an airplane in the sky today.</item> <item quantity='two'>There were a couple of airplanes in the sky today.</item> <item quantity='few'>There were a few airplanes in the sky today.</item> <item quantity='many'>There were %d airplanes in the sky today.</item> <item quantity='other'>There were %d airplanes in the sky today.</item> </plurals> <plurals name="numberOfBugs"> <item quantity='zero'>There were no bugs on the plant.</item> <item quantity='one'>There was one bug on the plant.</item> <item quantity='many'>There were %d bugs on the plant.</item> </plurals> <plurals name="numberOfSongsAvailable"> <item quantity='one'>One song found.</item> <item quantity='other'>%d songs found.</item> </plurals> <string name="hello">Hello!</string> </resources>
If your import fails an error message will be displayed. Later, you can also view the error here under Import History.
Updated over 2 years ago