List languages and their status
const url = 'https://api.legesher.io/v1/languages';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.legesher.io/v1/languagesAll active registry languages, with pack availability per code.
Responses
Section titled “ Responses ”Successful Response
Catalog of active languages.
object
One language as listed by the catalog endpoint.
object
ISO 639 language code, e.g. ‘es’.
English name, e.g. ‘Spanish’.
Native-script name, e.g. ‘Español’.
Whether a Python language pack is installed for this code.
Whether the script is right-to-left.
Example
{ "languages": [ { "status": "available" } ]}Headers
Section titled “ Headers ”Correlation id for this request: the validated inbound X-Request-ID when one was sent, else a server-minted UUID.
The translation engine is unavailable.
Envelope for every error response.
object
Machine-readable code + human message for one error.
object
Machine-readable error code, e.g. ‘validation_error’, ‘unsupported_language’, ‘language_pack_not_found’, ‘payload_too_large’, ‘foundation_unavailable’, ‘invalid_source_code’, ‘internal_error’.
Per-field breakdown (validation errors only).
One request-validation problem, stripped of the submitted input.
object
Dotted location of the offending field.
Human-readable description.
Pydantic error type identifier.
Human-readable explanation.
Example generated
{ "error": { "code": "example", "details": [ { "field": "example", "message": "example", "type": "example" } ], "message": "example" }}Headers
Section titled “ Headers ”Correlation id for this request: the validated inbound X-Request-ID when one was sent, else a server-minted UUID.