Translate YAML content while preserving all keys, nested structure, and formatting. String values are translated while non-string values remain unchanged. Ideal for localizing Rails i18n files, configuration files, and other YAML-based resources.
HTTP Request
| |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
source | string | No | "auto" | Source language code. Use auto for automatic detection |
target | string | Yes | — | Target language code |
Request Body
Send the YAML content as the raw request body with Content-Type: text/plain.
| |
Response
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | Whether the request was successful |
data.translated_yaml | string | The translated YAML content |
data.source_language | string | Detected or specified source language code |
data.source_language_name | string | Human-readable name of the source language |
Code Examples
| |
| |
| |
Related Endpoints
- Translate JSON — Translate JSON string values
- Translate TOML — Translate TOML configuration content
- Translate — Translate plain text