支持文件类型 (Strings)

.JSON - Chrome Messages (Strings)

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

文件扩展名 

.json

API 扩展 

json

导入 

导出 

复数形式支持 

描述支持 

格式选项 

Google 为 Chrome 扩展提供了国际化支持。Chrome 扩展的本地化字符串存储在一个通常名为 messages.json 的文件中。Chrome JSON 文件与其他平台上用于本地化的 .JSON 文件的结构略有不同。对于 Chrome JSON,需要翻译的字符串被放置在嵌套在每个单位键值对下的子键信息中。用户也可为每个键值对添加说明

AI 聊天机器人可以非常有效地从 .JSON 文件生成键列表。

代码示例

{
  "boolean_key": {
    "message": "--- true\n"
  },
  "empty_string_translation": {
    "message": ""
  },
  "key_with_description": {
    "message":"Check it!Key has a description!(In some formats)",
    "description":“对这个键非常重要的描述!”
  },
  "key_with_line-break": {
    "message":"This translations contains\na line-break."
  },
  "nested.deeply.key": {
    "message":"  I'm nested deeply."
  },
  "nested.key": {
    "message":“这个键嵌套在一个命名空间中。”
  },
  "null_translation": {
    "message": null
  },
  "sample_collection": {
    “信息”:“---\n- 第一项\n- 第二项\n- 第三项\n”
  },
  "simple_key": {
    "message":"I am a simple key with a simple message."
  },
  “unverified_key”: {
    "message":"Not yet verified waiting for it.(In some formats we also export this status)"
  }
}
这篇文章有帮助吗?

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.