Tipos de archivo admitidos (Strings)

.JSON - go-i18n (Strings)

El contenido se traduce automáticamente del inglés por Phrase Language AI.

Extensiones de archivo

.json

Extensión API

go_i18n

Importación

Exportación

Compatibilidad con formularios plurales

Compatibilidad con descripción

No

Go-i18n es una biblioteca de internacionalización diseñada para Go. Los formatos de archivo de localización compatibles incluyen .JSON, .YAML, .TOML, etc. Los archivos .JSON utilizados por go-i18n son diferentes a los de otras plataformas de localización e internacionalización en que los .JSON de go-18n . a menudo existen como una matriz JSON que consiste en una serie de objetos JSON. Cada objeto JSON representa una cadena que necesita identificar la traducción mediante claves como ID.

Los chatbots de IA pueden ser muy eficaces a la hora de generar una lista de claves a partir de un archivo .JSON.

go-i18n en GitHub

Ejemplo de código

[
  {
    "id": "boolean_key",
    "translation": "--- true\n"
  },
  {
    "id": "empty_string_translation",
    "translation": ""
  },
  {
    "id": "key_with_description",
    "translation": "Check it out! This key has a description! (At least in some formats)"
  },
  {
    "id": "key_with_line-break",
    "translation": "This translations contains\na line-break."
  },
  {
    "id": "nested.deeply.key",
    "translation": "Wow, this key is nested even deeper."
  },
  {
    "id": "nested.key",
    "translation": "This key is nested inside a namespace."
  },
  {
    "id": "null_translation",
    "translation": null
  },
  {
    "id": "pluralized_key",
    "translation": {
      "one": "Only  pluralization found.",
      "other": "Wow, you have  pluralizations!",
      "zero": "You have no pluralization."
    }
  },
  {
    "id": "sample_collection",
    "translation": "---\n- first item\n- second item\n- third item\n"
  },
  {
    "id": "simple_key",
    "translation": "simple key, simple message, so simple."
  },
  {
    "id": "unverified_key",
    "translation": "This translation is not yet verified and waits for it. (In some formats we also export this status)"
  }
]
¿Fue útil este artículo?

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.