Поддерживаемые типы файлов (Strings)

.JSON - Chrome Messages (Strings)

Контент автоматически переведен с английского языка с помощью Phrase Language AI.

Расширения файлов 

.json

Расширение API 

json

Импорт 

Да

Экспорт 

Да

Поддержка форм множественного числа 

Нет

Поддержка описания 

Да

Варианты формата 

Нет

Google оказывает поддержку интернационализации расширений Chrome. Локализованные строки для расширений Chrome хранятся в файле .JSON, который часто называют messages.json. Структура файлов Chrome JSON несколько отличается от структуры файлов .JSON, используемых для локализации на других платформах. В Chrome JSON строки, требующие перевода, помещаются в сообщение подключа, вложенное под каждую пару «ключ-значение». К каждой паре ключ-значение может быть добавлено описание.

Чат-боты искусственного интеллекта (ИИ) могут очень эффективно генерировать список ключей из файла .JSON.

Образец кода

{
  "boolean_key": {
    "message": "--- true\n"
  },
  "empty_string_translation": {
    "message": ""
  },
  "key_with_description": {
    "message": "Check it! Key has a description! (In some formats)",
    "description": "I'm a very important description for this key!"
  },
  "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": "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.