File JSON go-i18n¶
Added in version 4.1.
Cambiato nella versione 4.16: Support for v2 variant of this format was added.
go-i18n translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.
Nota
Weblate supports the go-i18n JSON v1 and v2 variants. Please choose correct file format matching your environment.
Vedi anche
File di esempio¶
File v1 esempio:
[
{
"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": ""
}
]
File v2 esempio:
{
"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": ""
}
}
Estensioni dei file |
|
|---|---|
Linguality ⓘ |
Monolingual |
Supports plural ⓘ |
|
Supports descriptions ⓘ |
|
Supports explanation ⓘ |
|
Supports context ⓘ |
|
Supports location ⓘ |
|
Supports flags ⓘ |
|
API identifier |
|
Supports read-only strings ⓘ |
|
Supports removing obsolete strings ⓘ |
|
Estensioni dei file |
|
|---|---|
Linguality ⓘ |
Both monolingual and bilingual |
Supports plural ⓘ |
|
Supports descriptions ⓘ |
|
Supports explanation ⓘ |
|
Supports context ⓘ |
|
Supports location ⓘ |
|
Supports flags ⓘ |
|
API identifier |
|
Supports read-only strings ⓘ |
|
Supports removing obsolete strings ⓘ |
|
Configurazione Weblate¶
Typical Weblate Component configuration for v1 |
|
|---|---|
Maschera del file |
|
File di lingua a base monolingue |
|
Modello per le nuove traduzioni |
Empty |
Formato file |
go-i18n v1 JSON file |
Typical Weblate Component configuration for v2 |
|
|---|---|
Maschera del file |
|
File di lingua a base monolingue |
|
Modello per le nuove traduzioni |
Empty |
Formato file |
go-i18n v2 JSON file |