localization
GET /v1/i18n/documents/{locale}
Get one marketing document's finished translations.
စစ်မှန်ကြောင်း အတည်ပြုခြင်း
ဤ အားထုတ်ရန်အမှတ်သည် လူတိုင်းသုံးနိုင်ပါသည်။ ၎င်းသည် အထောက်အထားအချက်အလက် သို့မဟုတ် အဖွဲ့အစည်း မည်သည့်အရာကိုမျှ မတောင်းခံပါ - ၎င်းသည် ကျွန်ုပ်တို့၏ ကိုယ်ပိုင်စျေးကွက်ရှာဖွေရေးဆိုက်နှင့် AI ဖြေဆိုသည့်အင်ဂျင်များ ဖတ်ရှုသည့်အရာပင် ဖြစ်ပါသည်။
ဤ အမှတ်ဆက် (endpoint) သည် အဖွဲ့အစည်း အိုင်ဒီ (organisation id) ကို မယူပါ။ သင်၏ သော့ချက် (key) သည် ၎င်းပိုင်ဆိုင်သည့် အဖွဲ့အစည်းကို အလိုအလျောက် ဖော်ထုတ်ပြီးဖြစ်ကာ တုံ့ပြန်ချက်ကိုလည်း ၎င်းနှင့်သာ ကန့်သတ်ထားမည် ဖြစ်သည်။
စမ်းကြည့်ရန်
ထောင့်ချိတ်များအတွင်းရှိ မည်သည့်အရာကိုမဆို သင်၏ကိုယ်ပိုင်တန်ဖိုးများဖြင့် အစားထိုးပြီး သင့်ဒက်ရှ်ဘုတ်မှ သော့ချက်တစ်ခုဖြင့် key ကို အစားထိုးပါ။
curl -X GET https://api.zinndigital.com/v1/i18n/documents/{locale}?object_ref=<object_ref>ဝင်ရောက်ပြီးပြီလား။ သင့်ဒက်ရှ်ဘုတ်ရှိ API ကွန်ဆိုးလ်တွင် သင့်၏ တကယ့်အဖွဲ့အစည်း ID နှင့် သင့်ကိုယ်ပိုင်သော့ချက်တို့ဖြင့် ဖြည့်သွင်းပေးပြီး တကယ့်တုံ့ပြန်ချက်ကို သင်မြင်နိုင်ရန် တိုက်ရိုက် API (live API) ကို အသုံးပြု၍ တောင်းဆိုမှုကို လုပ်ဆောင်ပေးပါသည်။ ဤအဆုံးသတ်အမှတ် (endpoint) ကို API ကွန်ဆိုးလ်တွင် ဖွင့်ပါ
အသေးစိတ်အချက်အလက်များ
Returns the finished translations for a **single** document, as `field -> text` across the surfaces a rendered page is built from (`page`, `meta_title`, `meta_description`, `alt_text`) — the read the public site performs on the server, per page, at render time. **Why a second public endpoint next to `getPublicMessageCatalogue`.** They are cached on different keys and answer different questions. The catalogue is one response per locale covering the shell (nav, footer, meta) and is read on every page; this is one response per document per locale, read only by the page it belongs to. Folding them together would churn the shell's cache entry whenever any of 60 marketing pages was retranslated. **⛔ `object_ref` is required.** One locale's whole `page` surface is ~7,879 entries — the read `scripts/i18n-pages.mjs` batches at build time, and the one that OOM-killed the engine on 2026-08-05. Making the parameter optional would re-create that on a public, unauthenticated URL. A single document is ~131 leaves, which is what makes this safe on a render path behind an edge cache. **Public and non-tenant**, for the same reasons as the catalogue: the text is already in the page's HTML, and an `Authorization` header suppresses shared caching. **`up_to_date` only** — the site applies this *over* the document the current deploy already serves, so stale text could only replace a good translation with an older one. **An untranslated document is a `200` with an empty `fields` object, never a `404`** — the caller treats any failure as "use the build-time document", so a `404` would be indistinguishable from an outage. Cacheable: strong `ETag` plus `Cache-Control: public, max-age=300, stale-while-revalidate=86400`.
ကန့်သတ်ဘောင်များ
| နာမည် | အမျိုးအစား | လိုအပ်သည် | ဘာလဲဆိုတာ |
|---|---|---|---|
locale (path) | LocaleCode | ဟုတ်ကဲ့ | The target locale (docs/28 registry code). |
object_ref (query) | string | ဟုတ်ကဲ့ | The document, e.g. `page:hosting`. Required — see the description. |
If-None-Match (header) | string | မဟုတ်ပါ | A previously returned `ETag`; a match responds `304`. |
တုံ့ပြန်ချက်
| နာမည် | အမျိုးအစား | လိုအပ်သည် | ဘာလဲဆိုတာ |
|---|---|---|---|
locale | LocaleCode | ဟုတ်ကဲ့ | BCP-47 / ISO locale code from the language registry (docs/28). |
object_ref | string | ဟုတ်ကဲ့ | The document these fields belong to, echoed back. |
fields | object | ဟုတ်ကဲ့ | `field -> translated text`, flat. The field names are the ones the CMS walker (`cms/src/lib/snapshotKeys.ts`) assigns when it collects a document's translatable leaves, so the c… |
ဤအမှတ်ဆက်မှ ပြန်ပေးနိုင်သော အမှားများ
422 · 429