Skip to content
Webfold Docs
Esc
↑↓navigate↵open⌘Jpreview

List the translatable strings in a file

Extracts translatable strings from a source or resource file. The file type comes from the filename extension (JSX/TSX, Vue, Svelte, HTML, Markdown, JSON, PO, YAML, XLIFF, Android XML, iOS strings, ARB, properties, CSV). Metered as localization.extract.

POST/v1/localization/extract
Authorization
AuthorizationBearer token (JWT) · headerrequired

Bearer API key issued for your account. Send Authorization: Bearer <key>.

Request body
requiredapplication/json
filenamestringrequired
contentstringrequired

Up to 1 MiB.

Responses
200

Extracted strings

filenamestringrequired
countintegerrequired
unitsobject[]required
Show properties
Array of object
keystring | null
textstringrequired
contextstring | null
400

Bad request

string
401

Missing or invalid bearer token

string
403

Billing or plan entitlement blocked the request

string
Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://api.webfold.ai/v1/localization/extract' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "filename": "locales/en.json",
  "content": "string"
}'
Response
{
  "filename": "string",
  "count": 0,
  "units": [
    {
      "key": "string",
      "text": "string",
      "context": "string"
    }
  ]
}