サポートするファイル形式(Strings)

.ARB - Application Resource Bundle (Strings)

本コンテンツはPhrase Language AIの機械翻訳により、英語から翻訳されています。

ファイル拡張子 

.arb

API拡張 

arb

インポート 

はい

エクスポート 

はい

複数形のサポート 

はい

説明のサポート 

はい

フォーマットオプション 

いいえ

ARB - アプリケーションリソースバンドルは、リソースエントリを JSON オブジェクトとしてエンコードした、JSON に基づくローカライゼーション用のファイル形式です。各オブジェクトは、オプションの属性を持つキーで構成されています。ARBファイルは、Flutterと呼ばれるGoogleモバイルアプリSDKで構築されたアプリのローカライゼーションに使用されます。

複数形化とプレースホルダー

互換性のために、ICUプレースホルダーと複数形化スタイルを使用します。

.ARB(アプリケーションリソースバンドル)ファイルの複数形化には、いくつかの重要な考慮事項があります。複数メッセージのカウントプレースホルダーは常に int 型です。複数のカテゴリを指定する場合、ゼロの代わりに =0 、1 の代わりに =1 、2 つの代わりに =2 を使用します。Flutterは複数形メッセージファイル形式の offset をサポートしていません。

コードサンプル

{
  "@@locale": "en_US",  "title_bar":「マイクールホーム」、
  "@title_bar": {
    "type": "text",
    "description":"Page title."
  },  "MSG_OK":「すべて順調です」, "FOO_123":「処理中のコストは{COST}です」、
  "@FOO_123": {
    "type": "text",
    "description": "balance statement."
  },
  "selectedRowCountTitle":"{selectedRowCount, plural, =0{アイテム未選択} =1{1アイテム選択} その他{{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.