Languages API
The Languages API provides endpoints for managing languages and language overrides in Joomla.
Base URL
/api/index.php/v1/languages
Endpoints Overview
Content Languages
| Method | Endpoint | Description |
|---|---|---|
| GET | /languages/content | Retrieve all content languages |
| GET | /languages/content/{id} | Retrieve specific language |
| POST | /languages/content | Create new content language |
| PATCH | /languages/content/{id} | Update content language |
| DELETE | /languages/content/{id} | Delete content language |
Language Overrides
| Method | Endpoint | Description |
|---|---|---|
| GET | /languages/overrides/{app}/{lang} | Retrieve overrides |
| POST | /languages/overrides/{app}/{lang} | Create override |
| PATCH | /languages/overrides/{app}/{lang}/{key} | Update override |
| DELETE | /languages/overrides/{app}/{lang}/{key} | Delete override |
Content Languages
Retrieve all content languages
GET /api/index.php/v1/languages/content
Response
{
"data": [
{
"type": "languages",
"id": "1",
"attributes": {
"lang_code": "en-GB",
"title": "English (UK)",
"title_native": "English",
"sef": "en",
"image": "en_gb",
"description": "",
"metakey": "",
"metadesc": "",
"sitename": "",
"published": 1,
"access": 1,
"ordering": 1
}
}
]
}
Create content language
POST /api/index.php/v1/languages/content
Request Body
{
"lang_code": "de-DE",
"title": "German (DE)",
"title_native": "Deutsch",
"sef": "de",
"image": "de_de",
"published": 1,
"access": 1
}
Required fields
| Field | Type | Description |
|---|---|---|
| lang_code | string | Language code (e.g. en-GB) |
| title | string | Language title |
| title_native | string | Native name of the language |
| sef | string | SEF prefix for URLs |
Optional fields
| Field | Type | Default | Description |
|---|---|---|---|
| image | string | "" | Flag image code |
| description | string | "" | Description |
| metakey | string | "" | Meta keywords |
| metadesc | string | "" | Meta description |
| sitename | string | "" | Site name for language |
| published | int | 1 | Publication status |
| access | int | 1 | Access level |
Example
curl -X POST "https://yoursite.com/api/index.php/v1/languages/content" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lang_code": "fr-FR",
"title": "French (FR)",
"title_native": "Français",
"sef": "fr"
}'
Update content language
PATCH /api/index.php/v1/languages/content/{id}
Example
curl -X PATCH "https://yoursite.com/api/index.php/v1/languages/content/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sitename": "My English Site"
}'
Language Overrides
Language overrides allow you to customize default Joomla translations.
Retrieve overrides
GET /api/index.php/v1/languages/overrides/{app}/{lang}
| Parameter | Values | Description |
|---|---|---|
| app | site, administrator | Frontend or backend |
| lang | en-GB, nl-NL, etc. | Language code |
Example
curl -X GET "https://yoursite.com/api/index.php/v1/languages/overrides/site/en-GB" \
-H "X-Joomla-Token: YOUR_API_TOKEN"
Response
{
"data": [
{
"type": "language-overrides",
"attributes": {
"key": "MOD_LOGIN_VALUE_USERNAME",
"value": "Username",
"app": "site",
"language": "en-GB"
}
}
]
}
Create override
POST /api/index.php/v1/languages/overrides/{app}/{lang}
Request Body
{
"key": "CUSTOM_LANGUAGE_STRING",
"value": "My custom text"
}
Example
curl -X POST "https://yoursite.com/api/index.php/v1/languages/overrides/site/en-GB" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"key": "MOD_LOGIN_VALUE_USERNAME",
"value": "Email address"
}'
Update override
PATCH /api/index.php/v1/languages/overrides/{app}/{lang}/{key}
Example
curl -X PATCH "https://yoursite.com/api/index.php/v1/languages/overrides/site/en-GB/MOD_LOGIN_VALUE_USERNAME" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"value": "New translation"
}'
Delete override
DELETE /api/index.php/v1/languages/overrides/{app}/{lang}/{key}
Example
curl -X DELETE "https://yoursite.com/api/index.php/v1/languages/overrides/site/en-GB/MOD_LOGIN_VALUE_USERNAME" \
-H "X-Joomla-Token: YOUR_API_TOKEN"
Installed Languages
Retrieve installed languages
GET /api/index.php/v1/languages/installed
This shows all installed language packages.
Language States
| Value | Status |
|---|---|
| -2 | Trash |
| 0 | Unpublished |
| 1 | Published |
Common Language Codes
| Code | Language |
|---|---|
| en-GB | English (UK) |
| en-US | English (US) |
| nl-NL | Dutch |
| de-DE | German |
| fr-FR | French |
| es-ES | Spanish |
| it-IT | Italian |
| pt-BR | Portuguese (BR) |
Multilingual Site Setup
For a multilingual site you need:
- Install language packages via Extension Manager
- Create Content Languages via this API
- Activate Language Filter plugin
- Link languages to menu items
tip
Use the System - Language Filter plugin to automatically detect the correct language based on browser settings or URL prefix.
Example: Search language strings
To find which key to override:
# Search in Joomla language files
grep -r "Username" /path/to/joomla/language/en-GB/
Or use the Language Overrides tool in the Joomla administrator.