|
File Extensions |
.arb |
|
API Extension |
arb |
|
Import |
Yes |
|
Export |
Yes |
|
Plural forms support |
Yes |
|
Description support |
Yes |
|
Format options These options that can be specified when a file is uploaded and/or downloaded. Depending on the upload/download method (API, CLI, Repo sync etc.), they can be specified in query parameters |
No |
ARB - Application Resource Bundle is a file format for localization based on JSON with the resource entries encoded as JSON objects. Each object consists of a resource key with an optional attribute. ARB files are used for the localization of apps built with the Google Mobile App SDK called Flutter.
Pluralization and Placeholders
Use the ICU placeholder and pluralization style for compatibility.
Pluralization in .ARB (Application Resource Bundle) files has several important considerations. The count placeholder in plural messages is always of type int. When specifying plural categories, use =0 instead of zero, =1 instead of one, and =2 instead of two. Flutter does not support the offset in the plural message format.
Code Sample
{
"@@locale": "en_US", "title_bar": "My Cool Home",
"@title_bar": {
"type": "text",
"description": "Page title."
}, "MSG_OK": "Everything works fine.", "FOO_123": "Your pending cost is {COST}",
"@FOO_123": {
"type": "text",
"description": "balance statement."
},
"selectedRowCountTitle": "{selectedRowCount, plural, =0{No items selected} =1{1 item selected} other{{selectedRowCount} items selected}}",
"@selectedRowCountTitle": {
"description": "Message that shows the number of selected rows",
"placeholders": {
"selectedRowCount": {
"type": "int",
"example": "2"
}
}
}
}