Languages & Translations
A directory has one default language and, on paid plans, extra languages. Every record (listing, category, tag, article, page, organizer, custom field) keeps its own text in one language and a translation for each of the others. The API works with both:GET /api/directories/{directory_id}/languagestells you which languages a directory has.?locale=on any read returns records in one language.- A
translationsobject appears on every record of a multilingual directory, and can be sent with any create or update.
Languages are added and removed in the dashboard under Settings → Languages. The API reads and writes translations for the languages a directory already has.
Get Directory Languages
directory_id(integer, required): The ID of the directory
default: the language records’ own fields are written in.languages: the default language first, then the extra languages.urlis that language’s home page.auto_translate: languages new listings are translated into automatically.do_not_translate: words AI translation keeps as they are.
Reading in a Language
Addlocale to any GET request:
locale, records come back exactly as stored.
A code that isn’t one of the directory’s languages returns 422:
locale only applies to reads. Sending it with POST, PUT or PATCH returns 422: write translations with the translations object instead.
The translations Object
On multilingual directories every record includes a translations object, keyed by language code:
Writing Translations
Sendtranslations with any create or update:
- Fields you leave out are unchanged.
null(or an empty string) removes that translation, so the page falls back to the original text.- A translated
slugis made unique within the directory, like default slugs. - Translations can be sent on their own or together with the record’s own fields in the same request.
422:
translations. A listing with an invalid translation is reported in errors and the others are still created.
Translatable Fields
Links, images, prices, toggles and relations are shared by all languages and can’t be translated.
Choice labels of select custom fields and listings’ text custom field values are translated in the dashboard (or with AI translation) and aren’t writable through the API yet. They are returned in the page language when you read with
locale.Listings Written in Another Language
Listings submitted from a language page (for example/es/listings/create) are stored in that language. Their source_locale is its code (null means the default language).
You can set it yourself when a listing’s text isn’t in the default language:
translations may include the default language, but not its own language. It appears on the Spanish pages as written, and on the other language pages (the default one included) in their translation, falling back to the Spanish text.
Webhooks and CSV
- Webhooks include
translationsin created/updated payloads and offer*.translatedevents. - CSV import and export read and write translations as
name:es-style columns.
