Get Language Info

About method

This method is used to get information about language. You can use it also to check language existence.

Method Usage

To get information about language, you need to send a POST request to the following URL:

https://cp.ocugine.pro/api/localization/get_lang/

Accepted Parameters:

Param Type Usage
app_id double Ocugine Project ID
app_key string Ocugine Project Client Key
code string Language code. For example: "en"

After which the server will give the following information:

{
  "complete": true,
  "message": "",
  "data": {
    "uid": "2",
    "code": "en",
    "name": "English",
    "time": "1560080422",
    "project_id": "1"
  }
}

Where:

Param Type Usage
complete bool The status of the operation. If false, the locale could not be obtained.
message string / null Error message. If complete = true, returns null
data language object Current language data

Language Object

The following describes the language object returned by the server.

Param Type Usage
uid bool Internal Language ID
code string Language Code
name string Language Name
time double The time of latest changes in this language
project_id double Ocugine Project ID for requested localized string