go-i18n JSON-bestanden

Added in version 4.1.

Veranderd in versie 4.16: Ondersteuning voor variant v2 van deze indeling werd toegevoegd.

Vertalingen van go-i18n zijn eentalig, aanbevolen wordt dus om een basisbestand te specificeren met (wat het meestal is) Engelse tekenreeksen.

Notitie

Weblate ondersteunt de varianten go-i18n JSON v1 en v2. Kies de juiste bestandsindeling die overeenkomt met uw omgeving.

Voorbeeldbestanden

Voorbeeld bestand v1:

[
  {
    "id": "hello",
    "description": "Description",
    "translation": "Ahoj světe!\n"
  },
  {
    "id": "orangutan",
    "description": "Description",
    "translation": {
      "one": "Orangutan has {{.Count}} banana.\n",
      "other": "Orangutan has {{.Count}} bananas.\n"
    }
  },
  {
    "id": "try",
    "description": "Description",
    "translation": ""
  },
  {
    "id": "thanks",
    "description": "Description",
    "translation": ""
  }
]

Voorbeeld bestand v2:

{
  "hello": "Ahoj světe!\n",
  "orangutan": {
    "description": "Description",
    "one": "Orangutan has {{.Count}} banana.\n",
    "other": "Orangutan has {{.Count}} bananas.\n"
  },
  "try": {
    "description": "Description",
    "other": ""
  },
  "thanks": {
    "description": "Description",
    "other": ""
  }
}

Weblate-configuratie

Typisch Weblate Configuratie onderdeel voor v1

Bestandsmasker

langs/*.json

Enkeltalig basistaalbestand

langs/en.json

Sjabloon voor nieuwe vertalingen

Leeg

Bestandsformaat

go-i18n v1 JSON-bestand

Typisch Weblate Configuratie onderdeel voor v2

Bestandsmasker

langs/*.json

Enkeltalig basistaalbestand

langs/en.json

Sjabloon voor nieuwe vertalingen

Leeg

Bestandsformaat

go-i18n v2 JSON-bestand