Google Flutter ARB Import / Export for Mobile
Using the Google Flutter ARB file format to import/export content
Within the Localize dashboard, we provide you with the ability to import and export phrases and translations in various file formats.
You can also import/export Glossary terms.
Importing / Exporting
To see a general explanation of how importing and exporting works in Localize, click here. Be sure to adhere to the file requirements below so that Localize will be able to successfully read your files.
Import First!
ARB files for the source language must first be imported into the Localize dashboard so that the
Resource Ids
from your strings file are added asphrase keys
in the phrase in the Localize dashboard. Then upon subsequent exports, thephrase keys
will be maintained.Exporting phrases for which there is no
phrase key
will result in the source language string being used as the key which is probably not a desirable outcome!!!
File Requirements
UTF-8 Character Encoding
Be sure that you are using the UTF-8 character encoding when working with the external files you are creating for importing purposes, so that special characters like accents are encoded properly.
ARB is a format that's used in the Google Flutter mobile application framework to exchange data between participants in a translation project. Currently, Localize is supporting a subset of the ARB format that is specified here: Application Resource Bundle Specification. See Google's article Internationalizing Flutter apps for more info.
Use the following sample for guidance when creating your Google Flutter ARB file for importing into Localize.
The following data is required:
"Resource Id": "Resource Value"
: for each string in your appResource Id
is a unique ID for the string (Localize calls this the phrase key)Resource Value
is the actual text of the string, either a source string or a translation
Sample Google Flutter ARB file in the source language of English:
{
"submit_button": "Submit",
"first_name_field": "First Name",
"last_name_field": "Last Name"
}
Sample Google Flutter ARB file in the target language of Spanish:
{
"submit_button": "Enviar",
"first_name_field": "Nombre",
"last_name_field": "Apellido"
}
Troubleshooting
If your import fails an error message will be displayed. Later, you can also view the error here under Import History.
Updated almost 2 years ago