List localizations with translations
- Sandbox: available
- Staging: available
- Production: unknown
Lists localization keys as pairs of the default-language value and its translation in a target language. Use it for translation screens that show the original next to the translation.
Auth: bearer token. Scope: the caller's project (from the token). Localizations are read and written with your token.
Behaviour
targetmust be one of the languages in your project's locale settings, and must not be the default language.- Each result has
source(the entry in the default language) andtarget(the entry in the target language) for the same key.targetis missing when the key has no translation yet. - Pairs are sorted by the target's
date, newest first, falling back to the source'sdate._sortis accepted but has no effect. searchis a fuzzy match over both values, both keys and the target's author name._countdefaults to10and must be greater than 0._offsetdefaults to0.totalis the number of matching pairs before paging.
Example
curl -X GET 'https://api.sandbox.ovok.com/localization/map/de-DE?search=home' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'bearerAuthorizationBearer <JWT>target*string"Cy-az-AZ""Cy-sr-SP""Cy-uz-UZ""Lt-az-AZ""Lt-sr-SP""Lt-uz-UZ""aa""ab""ae""af""af-ZA""ak""am""an""ar""ar-AE""ar-BH""ar-DZ""ar-EG""ar-IQ""ar-JO""ar-KW""ar-LB""ar-LY""ar-MA""ar-OM""ar-QA""ar-SA""ar-SY""ar-TN""ar-YE""as""av""ay""az""ba""be""be-BY""bg""bg-BG""bh""bi""bm""bn""bo""br""bs""ca""ca-ES""ce""ch""co""cr""cs""cs-CZ""cu""cv""cy""da""da-DK""de""de-AT""de-CH""de-DE""de-LI""de-LU""div-MV""dv""dz""ee""el""el-GR""en""en-AU""en-BZ""en-CA""en-CB""en-GB""en-IE""en-JM""en-NZ""en-PH""en-TT""en-US""en-ZA""en-ZW""eo""es""es-AR""es-BO""es-CL""es-CO""es-CR""es-DO""es-EC""es-ES""es-GT""es-HN""es-MX""es-NI""es-PA""es-PE""es-PR""es-PY""es-SV""es-UY""es-VE""et""et-EE""eu""eu-ES""fa""fa-IR""ff""fi""fi-FI""fj""fo""fo-FO""fr""fr-BE""fr-CA""fr-CH""fr-FR""fr-LU""fr-MC""fy""ga""gd""gl""gl-ES""gn""gu""gu-IN""gv""ha""he""he-IL""hi""hi-IN""ho""hr""hr-HR""ht""hu""hu-HU""hy""hy-AM""hz""ia""id""id-ID""ie""ig""ii""ik""io""is""is-IS""it""it-CH""it-IT""iu""ja""ja-JP""jv""ka""ka-GE""kg""ki""kj""kk""kk-KZ""kl""km""kn""kn-IN""ko""ko-KR""kr""ks""ku""kv""kw""ky""ky-KZ""la""lb""lg""li""ln""lo""lt""lt-LT""lu""lv""lv-LV""mg""mh""mi""mk""mk-MK""ml""mn""mn-MN""mr""mr-IN""ms""ms-BN""ms-MY""mt""my""na""nb""nb-NO""nd""ne""ng""nl""nl-BE""nl-NL""nn""nn-NO""no""nr""nv""ny""oc""oj""om""or""os""pa""pa-IN""pi""pl""pl-PL""ps""pt""pt-BR""pt-PT""qu""rm""rn""ro""ro-RO""ru""ru-RU""rw""sa""sa-IN""sc""sd""se""sg""si""sk""sk-SK""sl""sl-SI""sm""sn""so""sq""sq-AL""sr""ss""st""su""sv""sv-FI""sv-SE""sw""sw-KE""ta""ta-IN""te""te-IN""tg""th""th-TH""ti""tk""tl""tn""to""tr""tr-TR""ts""tt""tt-RU""tw""ty""ug""uk""uk-UA""ur""ur-PK""uz""ve""vi""vi-VN""vo""wa""wo""xh""yi""yo""za""zh""zh-CHS""zh-CHT""zh-CN""zh-HK""zh-MO""zh-SG""zh-TW""zu"_count?string"10"_offset?string"0"_sort?string"-date"search?stringPairs of default-language and target-language entries, with the total match count.
application/json- response
total*numberresources*array<>curl -X GET 'https://api.sandbox.ovok.com/localization/map/Cy-az-AZ'{ "total": 0, "resources": [ { "source": { "id": "string", "key": "string", "language": "Cy-az-AZ", "value": "string", "author": { "reference": "string", "display": "string" }, "date": "string", "projectId": "string" }, "target": { "id": "string", "key": "string", "language": "Cy-az-AZ", "value": "string", "author": { "reference": "string", "display": "string" }, "date": "string", "projectId": "string" } } ]}Write i18next resources for a language PATCH
Writes many localizations of one language at once from a nested i18next resource object. The write runs in the background. **Auth:** bearer token. **Scope:** the caller's project (from the token). Localizations are read and written with your token. ## Behaviour - `language` must be one of the languages in your project's locale settings (`GET /locales`). - The body is a nested object. Keys may contain only letters, digits, `_` and `-`; nesting builds dot-separated keys. Each value is either a string of 1 to 4,096 characters or another nested object. - Keys in the body are created or overwritten. Keys that are not in the body are not changed. Nothing is deleted. - The route answers `202 Accepted` with no body as soon as the job is queued. The values are written by a background job, and the cache for the language is cleared when it finishes. - A second background job per project language creates AI translations of the default-language values for keys that have no translation in that language yet. Existing translations are not changed. ## Example ```bash curl -X PATCH 'https://api.sandbox.ovok.com/localization/i18next/en-US' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' \ -H 'Content-Type: application/json' \ -d '{ "home": { "title": "Home", "subtitle": "Welcome back" } }' ```
List localizations for a language GET
Lists the localization keys and values of one language, with optional fuzzy search and paging. **Auth:** bearer token. **Scope:** the caller's project (from the token). Localizations are read and written with your token. ## Behaviour - `language` must be one of the languages in your project's locale settings (`GET /locales`). - Results are sorted by `date`, newest first. `_sort` is accepted but has no effect. - `search` is a fuzzy match over the value, the key and the author name. - `_count` defaults to `10` and must be greater than 0. `_offset` defaults to `0`. `total` is the number of matching entries before paging. - At most 10,000 entries per language are considered. - The list per project and language is cached. Writes through these routes clear the cache for the language they change. ## Example ```bash curl -X GET 'https://api.sandbox.ovok.com/localization/en-US?search=home&_count=20' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' ```