Multilingual Support
The D&D 5e SRD API supports multilingual responses, allowing you to request translated content in supported languages. English is always the default and fallback — if a translation is incomplete or unavailable, fields fall back to English individually, so responses are always complete documents.
Currently Supported Locales
Locale availability differs per ruleset year — the 2014 and 2024 catalogs do not have to ship the same translations.
| Code | Language | 2014 | 2024 |
|---|---|---|---|
en | English (default) | Yes | Yes |
fr-FR | French (France) | Yes | — |
pt-BR | Portuguese (Brazil) | Yes | Yes |
This table reflects locales with translated content at the time of writing. The authoritative, always-current list is served by the API itself — query /api/{year}/locales to discover the locales available for a given ruleset year at runtime.
Requesting a Language
Query Parameter (recommended)
Append ?lang={code} to any resource request. This is the recommended approach because it is explicit and cache-friendly.
GET /api/2014/spells/acid-arrow?lang=fr-FR
Accept-Language Header
The Accept-Language request header is also supported per RFC 5646. If both a lang query parameter and an Accept-Language header are present, the query parameter takes precedence.
Accept-Language: fr-FR
Language codes follow the BCP 47 standard (e.g. fr-FR, pt-BR).
Response Behavior
- Translated fields are merged over the base English document on a per-field basis.
- Untranslated fields always retain their English value — responses are never partial.
- The
Content-Languageresponse header reflects the requested language when at least one field was translated, orenwhen no translation exists for that document.
Translatable Fields
Only human-readable text fields are translated. Structural fields (indexes, URLs, numeric values, cross-references) always come from the English base document.
| Field | Translatable |
|---|---|
name | Yes |
desc | Yes |
higher_level | Yes |
equipment_category.name | Yes |
index | No |
url | No |
| Numeric values (HP, range, duration, etc.) | No |
| API reference objects | No |
Discovering Supported Languages
/api/{year}/languages lists D&D in-world game languages (Common, Elvish, etc.). /api/{year}/locales is the endpoint for API translation support.
List all supported locales
GET /api/{year}/locales
Returns all languages that have at least some translated content for the given ruleset year.
{
"count": 2,
"results": [
{ "lang": "fr-FR", "url": "/api/2014/locales/fr-FR" },
{ "lang": "pt-BR", "url": "/api/2014/locales/pt-BR" }
]
}
Get a specific locale
GET /api/{year}/locales/{lang}
Returns 404 if no translations exist for the requested language.
{
"lang": "fr-FR",
"url": "/api/2014/locales/fr-FR"
}
GraphQL
The optional lang argument is available on entity queries:
query {
spell(index: "acid-arrow", lang: "fr-FR") {
name
desc
}
}
Translation resolution is identical to REST — translated fields are merged before the resolver returns, with English as the per-field fallback.
Contributing Translations
Translations are entirely community-driven. No database access or special tooling is required.
- Fork the 5e-database repository
- Create or edit a file at
src/{year}/{lang}/5e-SRD-{Collection}.json - Include only the translatable fields for each entry — non-translatable fields are sourced from the English base automatically
- Open a PR — CI validates your translation against the English source
Example — French spell translation entry:
[
{
"index": "acid-arrow",
"name": "Flèche acide",
"desc": [
"Une flèche verte scintillante jaillit vers une cible..."
],
"higher_level": [
"Lorsque vous lancez ce sort avec un emplacement de sort de niveau 3 ou supérieur..."
]
}
]
See CONTRIBUTING.md in the database repository for full guidelines.