Support Log in

16. Languages API

Developer Guide
Prefer video? Watch the Lang Forge tutorials 9 short guides covering every feature Watch

REST endpoints for managing site languages.

GET /langforge/v1/languages

List all active languages configured on the site.

Permission: edit_posts Request:
bash
curl -s "https://example.com/wp-json/langforge/v1/languages" 
  -u "admin:XXXX XXXX XXXX XXXX XXXX XXXX"
Response (200):
json
[
    {
        "code": "ru",
        "name": "Russian",
        "native_name": "Русский",
        "locale": "ru_RU",
        "flag": "https://example.com/wp-content/plugins/langforge/assets/flags/ru.svg",
        "is_default": true,
        "is_current": true,
        "url": "https://example.com/"
    },
    {
        "code": "en",
        "name": "English",
        "native_name": "English",
        "locale": "en_US",
        "flag": "https://example.com/wp-content/plugins/langforge/assets/flags/gb.svg",
        "is_default": false,
        "is_current": false,
        "url": "https://example.com/en/"
    }
]

Forge AI Assistant Online

Hi! I'm the Lang Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs