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

.JSON - Chromeメッセージ(Strings)

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

ファイル拡張子 

.json

API拡張 

json

インポート 

はい

エクスポート 

はい

複数形のサポート 

いいえ

説明のサポート 

はい

フォーマットオプション 

ファイルがアップロードまたはダウンロードされる際に指定できるオプションです。アップロード/ダウンロード方法(API、CLI、リポジトリ同期など)に応じて、クエリパラメータ アップロードダウンロード、またはphrase.yml設定ファイルに指定できます。

いいえ

GoogleはChrome拡張機能のために国際化サポートを提供しています。Chrome拡張機能用にローカライズされた文字列は、通常messages.jsonという名前の.JSONファイルに保存されます。ChromeのJSONファイルは、他のプラットフォームでローカライゼーションに使用される.JSONファイルとは少し構造が異なります。Chrome JSONでは、翻訳が必要な文字列は、各ユニットのキーと値のペアの下にネストされたサブキーメッセージに置かれます。各キーと値のペアに説明を追加することもできます。

AIチャットボットは、.JSONファイルからキーの一覧を生成するのに非常に効果的です。

コードサンプル

{
  "boolean_key": {
    "message": "--- true\n"
  },
  "empty_string_translation": {
    "message": ""
  },
  "key_with_description": {
    "message": "Check it!キーに説明があります!(一部のフォーマット)\
    "description": "私はこのキーにとって非常に重要な説明です!"
  },
  "key_with_line-break": {
    "message": "This translations contains\na line-break."
  },
  "nested.deeply.key": {
    "message": "  I'm nested deeply."
  },
  "nested.key": {
    "message": "This key is nested inside a namespace."
  },
  "null_translation": {
    "message": null
  },
  "sample_collection": {
    "message": "---\n- first item\n- second item\n- third item\n"
  },
  "simple_key": {
    "message": "私はシンプルなメッセージを持つシンプルなキーです。"
  },
  "unverified_key": {
    "message": "まだ検証済み待ちです。"(一部のフォーマットでは、このステータスもエクスポートされます)"
  }
}
この記事は役に立ちましたか?

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.