<a id="go-i18n-json"></a>

# ໄຟລ໌ go-i18n JSON

<a id="index-0"></a>

#### Versionadded
Added in version 4.1.

#### Versionchanged
Changed in version 4.16: ໄດ້ເພີ່ມການຮອງຮັບສຳລັບຮູບແບບ v2 ຂອງຮູບແບບນີ້.

ການແປແບບ go-i18n ເປັນແບບພາສາດຽວ, ສະນັ້ນ ແນະນຳໃຫ້ລະບຸໄຟລ໌ພື້ນຖານທີ່ມີຂໍ້ຄວາມພາສາອັງກິດ (ເຊິ່ງມັກຈະເປັນແບບນັ້ນຫຼາຍທີ່ສຸດ).

#### NOTE
Weblate ຮອງຮັບ go-i18n JSON v1 ແລະ v2. ກະລຸນາເລືອກຮູບແບບໄຟລ໌ທີ່ຖືກຕ້ອງໃຫ້ເໝາະສົມກັບສະພາບແວດລ້ອມຂອງທ່ານ.

#### SEE ALSO
* [JSON](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/json.html)
* [go-i18n](https://github.com/nicksnyder/go-i18n)
* [ການອັບເດດໄຟລ໌ພາສາເປົ້າໝາຍ](https://docs.weblate.org/lo/latest/devel/integration.md#updating-target-files)
* [ປັບແຕ່ງການສະແດງຜົນ JSON](https://docs.weblate.org/lo/latest/admin/addons.md#addon-weblate-json-customize)
* [ລຶບລ້າງໄຟລ໌ການແປ](https://docs.weblate.org/lo/latest/admin/addons.md#addon-weblate-cleanup-generic)

## ໄຟລ໌ຕົວຢ່າງ

ຕົວຢ່າງໄຟລ໌ v1:

```json
[
  {
    "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": ""
  }
]
```

ຕົວຢ່າງໄຟລ໌ v2:

```json
{
  "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": ""
  }
}
```

<!-- AUTOGENERATED START: format-features go-i18n-toml -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### ຄຸນສົມບັດທີ່ຮອງຮັບ

| ນາມສະກຸນໄຟລ໌                                                                                    | `.toml`        |
|-------------------------------------------------------------------------------------------------|----------------|
| ຈຳນວນພາສາ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#bimono)                               | ພາສາດຽວ        |
| ຮອງຮັບພະຫູພົດ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-plurals)                   | `Yes`          |
| ຮອງຮັບຄຳອະທິບາຍ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-description)             | `No`           |
| ຮອງຮັບຄຳຊີ້ແຈງ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-explanation)              | `No`           |
| ຮອງຮັບບໍລິບົດ (context) [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-context)         | `No`           |
| ຮອງຮັບຕຳແໜ່ງ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-location)                   | `No`           |
| ຮອງຮັບທຸງ (flags) [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-flags)                 | `No`           |
| ຕົວລະບຸ API                                                                                     | `go-i18n-toml` |
| ຮອງຮັບຂໍ້ຄວາມແບບອ່ານຢ່າງດຽວ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#read-only-strings)  | `No`           |
| ຮອງຮັບການລຶບຂໍ້ຄວາມທີ່ລ້າສະໄໝ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#obsolete-strings) | `No`           |
<!-- AUTOGENERATED END: format-features go-i18n-toml -->
<!-- AUTOGENERATED START: format-features go-i18n-json -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### ຄຸນສົມບັດທີ່ຮອງຮັບ

| ນາມສະກຸນໄຟລ໌                                                                                    | `.json`                           |
|-------------------------------------------------------------------------------------------------|-----------------------------------|
| ຈຳນວນພາສາ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#bimono)                               | ເປັນທັງແບບພາສາດຽວ ແລະ ສອງພາສາ     |
| ຮອງຮັບພະຫູພົດ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-plurals)                   | `Yes`                             |
| ຮອງຮັບຄຳອະທິບາຍ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-description)             | `Yes`                             |
| ຮອງຮັບຄຳຊີ້ແຈງ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-explanation)              | `No`                              |
| ຮອງຮັບບໍລິບົດ (context) [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-context)         | `No`                              |
| ຮອງຮັບຕຳແໜ່ງ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-location)                   | `No`                              |
| ຮອງຮັບທຸງ (flags) [ⓘ](https://docs.weblate.org/lo/latest/formats.md#format-flags)                 | `No`                              |
| ຕົວລະບຸ API                                                                                     | `go-i18n-json`, `go-i18n-json-v2` |
| ຮອງຮັບຂໍ້ຄວາມແບບອ່ານຢ່າງດຽວ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#read-only-strings)  | `No`                              |
| ຮອງຮັບການລຶບຂໍ້ຄວາມທີ່ລ້າສະໄໝ [ⓘ](https://docs.weblate.org/lo/latest/formats.md#obsolete-strings) | `No`                              |
<!-- AUTOGENERATED END: format-features go-i18n-json -->

## ການຕັ້ງຄ່າ Weblate

|                            | [ການຕັ້ງຄ່າ Component](https://docs.weblate.org/lo/latest/admin/projects.md#component) ຂອງ Weblate ໂດຍປົກກະຕິສຳລັບ v1   |
|----------------------------|----------------------------------------------------------------------------------------------------------------|
| ໜ້າກາກໄຟລ໌                 | `langs/*.json`                                                                                                 |
| ໄຟລ໌ພາສາຫຼັກ (Monolingual) | `langs/en.json`                                                                                                |
| ແມ່ແບບສຳລັບການແປໃໝ່        | ຫວ່າງເປົ່າ                                                                                                     |
| ຮູບແບບໄຟລ໌                 | ໄຟລ໌ JSON go-i18n v1                                                                                           |

|                            | [ການຕັ້ງຄ່າ Component](https://docs.weblate.org/lo/latest/admin/projects.md#component) ຂອງ Weblate ໂດຍປົກກະຕິສຳລັບ v2   |
|----------------------------|----------------------------------------------------------------------------------------------------------------|
| ໜ້າກາກໄຟລ໌                 | `langs/*.json`                                                                                                 |
| ໄຟລ໌ພາສາຫຼັກ (Monolingual) | `langs/en.json`                                                                                                |
| ແມ່ແບບສຳລັບການແປໃໝ່        | ຫວ່າງເປົ່າ                                                                                                     |
| ຮູບແບບໄຟລ໌                 | ໄຟລ໌ JSON go-i18n v2                                                                                           |
