Main menu

Get a project locale

GET https://localise.biz/api/locales/{locale} 

Gets a single locale in currently authenticated project

URI parameters

locale

Locale short code, or language tag

string required
key

API key - required if not sent in Authorization header

string optional

Request headers

Authorization

API key sent as "Loco <key>" or "Basic <encoded>". See Authentication.

string required if not in query

Response

A single JSON-encoded Locale object, which takes the following form:

{
    "code": "", // Locale short code, or language tag
    "name": "", // Friendly display name
    "source": false, // Whether the default/source locale of the project
    "plurals": {
        "length": 2, // Number of forms including singular
        "equation": "n != 1", // Equation for calculating offset in forms
        "forms": ["zero","one","two","few","many","other"], // Plural form names
    },
    "progress": {
        "translated": 0, // Number of assets for which a translation exists (including those flagged)
        "untranslated": 0, // Number of assets that are not yet translated to this language
        "flagged": 0, // Number of translations that are flagged as requiring attention
        "words": 0, // Approximate word count for translated texts in this language
    }
}  

Try it

Open in test console »


« /api/locales