支持文件类型 (Strings)

.ARB - Application Resource Bundle (Strings)

文本由 Phrase Language AI 从英语机器翻译而得。

文件扩展名 

.arb

API 扩展 

arb

导入 

导出 

复数形式支持 

描述支持 

格式选项 

这些选项可以在文件上传和/或下载时指定。根据上传/下载方法(API、CLI、Repo同步等),它们可以在查询参数中指定 上传下载 或在 phrase.yml 配置文件中。

ARB - 应用资源包 是一种基于 JSON 的本地化文件格式,资源条目编码为 JSON 对象。每个对象由一个资源键和一个可选属性组成。ARB 文件用于本地化使用 Google 移动应用 SDK 构建的应用,称为 Flutter

复数和占位符

使用 ICU 占位符和复数化样式以确保兼容性。

.ARB(应用资源包)文件中的复数化有几个重要的考虑因素。复数消息中的计数占位符始终为类型 int。在指定复数类别时,使用 =0 而不是 ,使用 =1 而不是 ,使用 =2 而不是 。Flutter 不支持复数消息格式中的 偏移量

代码示例

{
  "@@locale": "zh_CN",  "title_bar":"我的酷主页",
  "@title_bar": {
    "type": "text",
    "description":"页面标题。"
  },  "MSG_OK":"一切正常。",  "FOO_123":"您的待处理费用是 {COST}",
  "@FOO_123": {
    "type": "text",
    "描述": "余额报表。"
  },
  "selectedRowCountTitle": "{selectedRowCount, plural, =0{未选择条目} =1{选择了1条目} other{{selectedRowCount} items selected}}",
  "@selectedRowCountTitle": {
    "description":"显示所选行数的消息",
    "placeholders": {
      "selectedRowCount": {
        "type": "int",
        "example":"2"
      }
    }
  }
}
这篇文章有帮助吗?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.