Get Locale List

About method

This method is used to get all localized strings list for your project. You can use it to load all locales in your game by one request.

Method Usage

To get all localized strings list, you need to send a POST request to the following URL:

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

Accepted Parameters:

Param Type Usage
app_id double Ocugine Project ID
app_key string Ocugine Project Client Key

After which the server will give the following information:

{
  "complete": true,
  "message": "",
  "data": {
    "list": [
      {
        "lang_name": "en",
        "locales": [
          {
            "uid": "85",
            "code": "test-noe",
            "value": "Bla Bla",
            "lng": "en"
          },
          {
            "uid": "86",
            "code": "test-node2",
            "value": "Fuck Yu",
            "lng": "en"
          }
        ]
      },
      {
        "lang_name": "ru",
        "locales": [
          {
            "uid": "87",
            "code": "test-noe",
            "value": "Ска",
            "lng": "ru"
          }
        ]
      }
    ]
  }
}

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 array Locales List based on Locale Object separated by language sub arrays

Locale Object

The following describes the locale object returned by the server.

Param Type Usage
uid bool Internal localized string ID
code string Localized string code
value string Localized string value